skip to Main Content

Dockerizing Nextjs with typescript

I'm trying to build a Docker Image of my Nextjs frontend(React) application for production and am currently stuck at typescript integration. Here's the Dockerfile. FROM node:14-alpine3.14 as deps RUN apk add --no-cache tini ENTRYPOINT ["/sbin/tini", "--"] EXPOSE 4500 RUN apk…

VIEW QUESTION

How to connect mongoDB in react

Such a problem that when I try to simply connect mongoDB in react import React, {Component} from 'react'; export default class App extends Component{ componentDidMount(){ const {MongoClient} = require('mongodb'); const client = new MongoClient('mongodb+srv://dafu4k:****@cluster0.jd26aac.mongodb.net/?retryWrites=true&w=majority'); const start = async () =>…

VIEW QUESTION
Back To Top
Search