Skip to main content

Building your application

Building your application for production depends on which base language and which application type you chose for your boilerplate.

Note

In order to use your application in production mode you must set the NODE_ENV variable equal to production in your .env file. This will configure your application to use the build artifacts created below.

See the relevant documentation to build your application for production:

- Javascript full-stack

- Javascript API

- Typescript full-stack

- Typescript API

Building your Javascript full-stack application#

To build your Javascript full-stack application run:

npm run build

This will build your client side code and place it inside a build folder in your project directory.

Once you have built your application you can now start your application in production mode

Building your Javascript API application#

You do not need to build your application if you are running a Javascript API boilerplate. Simply update your NODE_ENV as per the above note and you are ready to deploy your application to production.

Building your Typescript full-stack application#

Build both client and server at the same time for production#

npm run build

Build only the client for production#

npm run build:client

Build only the server for production#

npm run build:server

Once you have built your application you can now start your application in production mode

Building your Typescript API application#

npm run build

Once you have built your application you can now start your application in production mode