Coder Social home page Coder Social logo

nestjs-starter's Introduction

Local setup

Install dependencies:

pnpm install

Copy the env example file:

cp .env.example .env

Update fields in .env

Make sure you remember to also update the docker-compose-test.yml file!

This repo comes with a default User model out of the box defined in the /apps/backend/src/database/prisma.schema file:

model User {
  id        Int       @id @default(autoincrement())
  email     String    @unique
  createdAt DateTime  @default(now())
  updatedAt DateTime  @updatedAt
}

Before you can use the local server, you need to apply this migration to your local Postgres database.

Make sure on your local machine you don't have any existing Docker containers running that would cause a conflict.

Then spin up the local Postgres database using this script:

pnpm docker:start

Then run this script to apply the migration to your local Postgres database:

pnpm db:migrate:dev

And that's it!

You can now spin up your local server with this script:

pnpm start:dev

nestjs-starter's People

Contributors

dan86de avatar

Stargazers

woolf1717 avatar Paweł avatar Michał Topór-Futer avatar  avatar Alicja Gałkiewicz avatar  avatar

Watchers

 avatar Paweł avatar Sebastian Komorowski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.