A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.
Description
Nest framework TypeScript starter repository.
Installation
$ npm install
Name .env.example to .env and ormconfig.json.example to ormconfig.json and add values accordingly.
.env names are case sensitive!
Configuring a database with Docker for this application:
# first run
docker run --name postgis -p 5432:5432 -d -v /home/postgres:/var/lib/postgresql/data mdillon/postgis
# stopping the container
docker stop postgis
# starting the container
docker start postgis
# you can also have the container boot on computer startup with --restart option
--restart=always
# for example:
docker run --name postgis -p 5432:5432 -d -v /home/postgres:/var/lib/postgresql/data --restart=always mdillon/postgis
# starting bash inside the container
docker exec -it postgis bash
# connecting to the postgis service inside docker
psql -U postgres
# Inside the database:
# Creating database
create database ehasa;
# Connect to created database
\c ehasa;
# Create user for database
create user ehasa
alter user ehasa with encrypted password 'salasana';
# Give privileges to use database
grant all privileges on database ehasa to ehasa;
# Needed extensions
create extension "uuid-ossp";
# exit postgis
\q
Running the app
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
Test
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
Stay in touch
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
License
Nest is MIT licensed.