Skip To Main Content

How to Deploy Your Faust.js App

The following guide explores the various options for deploying your Faust.js App to production.

Picking The Right Node.js Version

Faust.js supports Node.js v16.x and v18.x. Please make sure you are using a Node.js version that is compatible when deploying to avoid unexpected errors.

Recent versions of Faust.js uses package.json engines field that will produce warnings when your package is installed as a dependency under a non compatible NPM/Node version.

Building Your App

Faust.js is built on top of Next.js, so the build process is identical. Take a look at the Next.js Build API for info relating to how Next.js generates an optimized production build.

Deploying To Atlas

Atlas is the most effortless way to deploy a Faust.js app. Connect your GitHub repo and Atlas will automatically build and deploy your Faust.js project on each push. Some of the benefits you get out of the box are:

  • Automatic installation of required WordPress plugins (FaustWPGraphQL, etc.)
  • Automatic setup of Faust.js environment variables
  • Automatic configuration of the Faust WordPress plugin’s settings
  • WordPress and your headless app live in the same place
  • Automatic rebuilds on code changes
  • Support for custom domains

Deploy your Faust.js app and try Atlas for free!

If deploying from the Atlas portal using your own repository (without beginning with a blueprint), you will need to set your environment variables manually. Learn how by taking a look at our FAQs.

Self Hosted

You can also self host Faust.js apps on any hosting provider that supports Node.js.

To self host your Faust.js app, you will need to first build the app, then start it. Make sure you have the faust build and faust start scripts specified in your package.json file:

// package.json
  "scripts": {
    "build": "faust build",
    "start": "faust start"
Code language: JSON / JSON with Comments (json)

Then, from the Node.js server run npm run build to build the app and npm run start to start it.