Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

rudnovd/laundry-labels-app-api

Repository files navigation

Laundry Labels App Api

API repository of Laundry Labels App.

Development

  1. Clone repository
  2. Install Nodejs
  3. Install npm dependencies: npm install
  4. Copy .env-example and rename to .env: cp .env-example .env

With Docker

  1. Install Docker Engine and Docker Compose
  2. Run containers: docker compose -f docker-compose.dev.yml up
  3. Run server: npm run dev

Without Docker

  1. Install MongoDB or get database from Atlas
  2. Install Redis or get Redis store from Redis Enterprise
  3. Run server: npm run dev
  4. Fill MongoDB and Redis credentials in .env
DATABASE_URI=Address from Atlas
REDIS_URI=Address from Redis Enterprise

Environment values

All environment values used by the server must be in the .env file

If you want to change the paths of user files, edit this value
# UPLOAD_PATH=/srv/laundrylabelsapp/

If you want to change the paths of the server log files, edit this value
# LOGS_PATH=/var/log/laundrylabelsapp/

Captcha key from https://www.hcaptcha.com, used for production server
# CAPTCHA_SECRET_KEY=CAPTCHA_KEY_from_hcaptcha.com

Letsencrypt credentials for creating SSL certificates, used with docker-compose.yml
# LETSENCRYPT_EMAIL=yourdomainemail@examle.com
# LETSENCRYPT_DOMAINS_LIST=example.com,www.example.com,api.example.com

# If you want to store user files in the cloud, register at https://cloudinary.com and fill API credentials
# IS_CLOUD_SERVER=true
# CLOUDINARY_CLOUD_NAME=CLOUD_NAME_from_cloudinary.com
# CLOUDINARY_API_KEY=CLOUD_API_KEY_from_cloudinary.com
# CLOUDINARY_API_SECRET=CLOUD_SECRET_from_cloudinary.com

License

This project is licensed under the GNU GPLv3 License.