NextJS
Last updated
Last updated
The configuration for NodeJS is located at the .env file. You can find more information at src/env.server.ts, which is the .env validator.
Make sure you have installed on your machine. The recommended version is 18.
Is recommended that you use a Node Version Manager tool for you to be able to switch version if you need it in the future.
MacOS/Linux:
Windows:
Please make sure you have installed and running on your machine.
Also, make sure you have access to that database using a database GUI tool.
The .env file is located at .env and it stores the environment variables.
If you are using the default PostgreSQL database on your localhost, you can leave the configuration as it is.
Note the DATABASE_URL uses the appuser and the DATABASE_MIGRATION_URL uses postgres. This is proposital. In order to make use of Row Level Security (RLS), the user the app uses must NOT have superuser privileges. In other hand, the user that runs the migration must.
You can leave this configuration as it is. The backend URL is only required in case you want do have different servers to handle frontend and backend, but usually it's not the case.
The tenant mode can be "multi" or "single". It depends if you want your application to have multiple tenants/workspaces/organizations or just one.
The token secret is used to sign JWT tokens. Please replace the JWT secret to some random and long UUID chain. For example: a40a8850-24b2-4023-85ce-1765d10c849b-758df0c2-b112-4851-960d-1b7163d3ccd6
The JWT expiration invalidates the tokens after a certain period that can be configured on the AUTH_JWT_EXPIRES_IN
variable.
Google, Facebook, and Github secrets are used for oAuth authentication. They are optional.
The Bypass Email Verification flag is used to skip email verification for new users.
The app optionally uses Recaptcha to prevent abuse on the authorization process. If you want to enable it, replace with your Recaptcha credentials.
For storage configuration, go to Setup > File Storage.
To send emails you must configure the SMTP settings.
Go to the root of your project and run:
You can ignore installation warnings.
Go to the root of your project and run:
This will create the database you set on the .env file with the application schema.
Go to the root of your project and run:
If you're using subscriptions and payments, you need to setup the Stripe variables. Go to with Stripe for full details.