- Dockerize the app
From your terminal:
npm run dev
This will start the Express server at port 3000. It will automatically reload your browser when you make changes to your code.
Sometimes after executing npm run dev
you may see an error like Error: Cannot find module 'server.js'
.
To fix this, run npm run build:server
and then npm run dev
again.
First, build your app for production:
npm run build
Then run the app in production mode:
npm start
Now you'll need to pick a host to deploy it to.