The backend to this Pokédex frontend built with NestJS. Currently a mirror from a Gitlab repository.
- Clone the repository and install the dependencies.
git clone git@github.com:Haltarys/Pokedex-Server.git
cd Pokedex-Server
yarn install
- 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=*
- Start the server.
docker compose up -d --build
- First time only, create an admin user.
./setup-db.sh
- 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.