Skip to content

erwolff/nest-server

Repository files navigation

NestJS Logo

Description

A simple back-end server built using the nest.js framework for the purpose of demonstrating coding/architecture proficiency. This server functions as a movie database, allowing users to sign-up, authenticate, and create/retrieve movies from the database using basic http requests.

OpenAPI documentation can be viewed by starting the server locally, then navigating to http://localhost:3000/docs

Basic Stack

Database: MongoDB
Cache: Redis
Messaging: Amazon SQS
Web Framework: Express

Setup

# install correct version of node
$ nvm install v20.9.0

# install yarn
$ npm install -g yarn

Installation

# install dependencies
$ yarn install

Starting the services

# from the project root
$ docker-compose up

# or start the services in the background
$ docker-compose up -d

Running the app

In order to run the application, first copy the .env.example file contents into a new .env file, and edit the environment variables as necessary.

# build the app
$ yarn run build

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Test

# unit tests
$ yarn run test:unit

# e2e tests
$ yarn run test:e2e

Troubleshooting

AggregateError: 
    at internalConnectMultiple (node:net:1102:18)
    at afterConnectMultiple (node:net:1620:5)
error Command failed with exit code 1.

The server is unable to connect to a required service. Is docker running and configured properly?

About

A demo server using NestJS for résumé purposes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages