Skip to main content

Installations & Run

After the server configuration, you have to run the following commands in the terminal to start the application.

Prerequisites

  • Previous steps

1st step: Install the dependencies

The following command will install all the dependencies required to run the application.

npm install

2nd step: Generate database schema

The following command will generate the database schema.

npm run db:generate

3rd step: Push the database schema to the database

The following command will push the database schema to the database.

npm run db:push

4th step: Database seeding

Run the following command to seed the database.

npm run db:seed
tip

You can change the seeding information from /src/db/seed.ts file

After running the above command, you will get an initial user to perform admin action.

  • Name: John Doe
  • Email: admin@aidbquery.com
  • Password: admin123
  • isEmailVerified: true
  • role: ADMIN
  • status: ACTIVE

The following command will show your database where you can view, update and delete in your database.

npm run db:studio

5th step: Build production

The following command will build the application for production.

npm run build

6th step: Start the application(optional)

The following command will start the application. But you can use pm2 to start the application for better performance. Follow the next steps.

npm start

Congratulations! You have successfully installed the application. Now you can access the application from the browser.