Skip to content

Haltarys/Pokedex-Server

Repository files navigation

Pokedex-Server

The backend to this Pokédex frontend built with NestJS. Currently a mirror from a Gitlab repository.

Getting started

Prerequisites

Installation

  1. Clone the repository and install the dependencies.
git clone git@github.com:Haltarys/Pokedex-Server.git
cd Pokedex-Server
yarn install
  1. Create a .env file in the root directory following this model.
# MongoDB configuration
DATABASE_URL=mongodb://mongo:27017
DATABASE_USER=root
DATABASE_PASSWORD=password

# Jwt configuration
JWT_SECRET=some_very_long_secret
JWT_EXPIRATION_TIME=15m

# Launch configuration
# Change port if need be
# PORT=3002
# Comma-separated list of origins, '*' if omitted
CORS_ORIGIN=*
  1. Start the server.
docker compose up -d --build
  1. First time only, create an admin user.
./setup-db.sh
  1. Production

On the production server only Create a ssl directory with a cert.pem and key.pem file for the SSL keys. Run deploy.sh to build the project and start the server in production mode.

About

The backend to https://github.com/Haltarys/Pokedex-Client built with NestJS. Initially from a Gitlab repository.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published