A boilerplate for a Node.js server with Express framework and a client app built with Webpack. Written in Typescript. Supports containerization using Docker.
npm install
npm run start:dev
- public
- Static assets like images may go here. They are served using a static middleware. Assets generated by Webpack are put into the `generated` subfolder.
- public/generated
- Assets generated by Webpack
- src
- The server application
- src/app
- The client application
The postinstall
script automatically builds the client app.
As long as NODE_ENV
is set to production
, just run npm install && npm start
. Else, use npm run start:prod
instead of npm start
.