/todo-app

Primary LanguageTypeScript

NestJS Todo App

This app is made for learning the Nest.js framework.

Configure and deploy

  1. First, you need to install the packages
npm i
# or with yarn
yarn
  1. Create an .env file with the DATABASE_URL variable. Make sure you include your database url

  2. You can use with Prisma DBMS like MySQL/MariaDB, PosgreSQL, MongoDB, CockroachDB, etc. If you want to use something other than MongoDB, you can edit the prisma/scema.prisma file like this

...
datasource db {
  provider = "postgesql"
  // provider = "mongodb"
  url = env("DATABASE_URL")
}
...
  1. Now you need to push the Prisma scheme into database. To do this you need to run it in your terminal:
yarn prisma db push
  1. Okay, you have done the first 3 steps. You can run some tests of database connection and manipulations (creating tests in progress, but some basic tests already done)
yarn test
  1. Now you're ready to launch the application.
  • To run the application in development mode, execute the command
yarn run start:dev
  • To build the application, run
yarn run build

After building you can launch app using

yarn run start:prod