Installation
How to get started to create a new VitNode app.
Video
Guide
Pre-installation
Before you start, make sure you have the following software installed on your machine:
- Node.js (version 20 or higher) - for running JavaScript code,
- Docker or PostgreSQL (version 14 or higher) - for running the database.
CLI
To create a new app with VitNode use create-vitnode-app
CLI.
Options
You can pass options to the CLI to customize the app creation process.
Option | Description |
---|---|
--package-manager | Specify the package manager to use. Support npm , pnpm . |
--eslint | Initialize with eslint config. |
--docker | Initialize with Dockerfile & Docker Compose. |
--no-eslint | Skip initializing with eslint config. |
--skip-install | Skip installing packages after initializing the project. |
Database setup
VitNode requires to have a database to run the app. We created 2 ways to setup the database:
1. Using Docker
Docker is the fastest way to setup the database. Our pre-configuration allows you to start the database with a single command.
2. Manual Setup
If you don't want to use Docker, you can setup the database manually. Install PostgreSQL and create a new database.
After that, go to .env
file in the root of the project and fill the following variables:
Optional Variables
Commented variables are optional, you can uncomment them if you want to use them.
Register Account
After starting the server, you need to register an account. Open the browser and go to http://localhost:3000/register to create a new account.
First user will be an admin.