/sahibinden-d2d-angular-nestjs

The project we have live coded during Sahibinden D2D event

Primary LanguageTypeScript

Sahibinden D2D Event Live Coding Session: Angular + NestJS Monorepo

This is a preview app. It is unfinished and just a glimpse of how Angular and NestJS can work together.

Pre-requisites

  • Node.js v10+
  • PostgreSQL

Preparation

  • Make sure you have a database and a user in PostgreSQL.
  • Your user will need pg_read_server_files role. If the user has it, skip the next step.
  • Run psql -U {{admin_user}} -d {{database_name}} -c "GRANT pg_read_server_files TO {{user_name}};" in terminal.

Development

  • Before you start, make sure you have done everything above.
  • Clone this repository: git clone https://github.com/armanozak/sahibinden-d2d-angular-nestjs.git
  • Run cd sahibinden-d2d-angular-nestjs in terminal.
  • Rename .env.sample to .env and fill it with your database and user information.
  • Run npm run migration:run in terminal.
  • Run npm install in terminal.
  • Run npm start in terminal.
  • API docs available at http://localhost:3333/docs
  • Frontend app runs at http://localhost:4200

Production Build

  • Go to root directory (sahibinden-d2d-angular-nestjs).
  • Run npm run build in terminal.
  • Run npm run start:server in one terminal to start the server.
  • Run npm run start:appin another terminal to start the frontend app.