Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

nextorders/api

Repository files navigation

API

Frontend needs data from backend: categories, products, checkouts, etc.

This part of product is for first frontend: https://github.com/next-orders/v1

next-orders-entities

Stack

  • Node.js
  • NestJS
  • Express
  • Prisma ORM
  • TypeScript
  • PostgreSQL as DB

How to develop

Clone this repo and use standard commands:

npm i
# Development
npm run start
# Watch mode
npm run start:dev

One moment: default port is 4001

How to test

# Unit tests
npm run test
# e2e tests
npm run test:e2e
# Test coverage
npm run test:cov

How to deploy

You can use latest Docker Image:

docker pull ghcr.io/next-orders/api:latest
# or use the specific version
docker pull ghcr.io/next-orders/api:v0.1.0

You need to use env variables:

API_URL= # URL of this Main API
DATABASE_URL= # PostgreSQL connection URL for Prisma
JWT_SECRET= # Secret string
JWT_EXPIRATION_TIME= # Example, "30d"
AWS_ACCESS_KEY_ID= # S3 Config
AWS_SECRET_ACCESS_KEY= # S3 Config
AWS_S3_REGION= # S3 Config
AWS_S3_BUCKET_NAME= # S3 Config
CUSTOM_S3_ENDPOINT= # Optional
DEMO_AUTH_EMAIL= # Optional, used on Command Center Login Page
DEMO_AUTH_PASS= # Optional, used on Command Center Login Page

Check .env.example in root dir for more info about env.

On Kubernetes you can use health check of container:

livenessProbe:
 httpGet:
 port: 4001
 path: /api/health
 initialDelaySeconds: 20
 periodSeconds: 30

License

This project is licensed under the MIT License - see the MIT License file for details.

About

Frontend needs data from backend: categories, products, checkouts, etc.

Topics

Resources

License

Stars

Watchers

Forks

Packages

Languages

AltStyle によって変換されたページ (->オリジナル) /