You must have Node.js, PostgreSQL database installed in your system.
In order to edit the code make sure to install an JavaScript IDE like VS Code or your preffered one.
npm i
- Make sure
npm i
command is successfully executed. - Make sure you have created a database named
demo
in your PostgreSQL. - Create a
.env
file in root directory and make sure to updateDATABASE_URL
,JWT_SECRET
andSENDGRID_API_KEY
to ensure your application will run properly. You can copy contents from example.env to get started quickly. - Once all above steps are complete go to the project root directory and run
npx prisma generate
this command in order to update the prisma client. - Once Prisma client is setup run
npx prisma migrate dev --preview-feature --skip-generate --name "init"
this command to generate schema in your project which will generate SQL files, which you can use to create table structures into the system. - Alternative to manually running SQL script you can run
npx prisma db pull
this command which will create table structures into the system.
In dev mode "npm run dev"
You can access swagger documentation on this URL once your server is up and running.
- Version 1.0.0
- License MIT