saizaax / yet-another-schedule-app-backend

Backend — Yet Another Schedule App

Home Page:https://github.com/saizaax/yet-another-schedule-app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backend — Yet Another Schedule App

Express TypeScript PostgreSQL Docker GitHub Actions

Run develop build

  • Download Node.js

  • Clone this repository

    git clone https://github.com/saizaax/yet-another-schedule-app-backend
  • Open terminal and navigate to repository directory

    cd yet-another-schedule-app-backend
  • Add .env file to root directory

    PORT=8000
    DATABASE_URL=postgresql://username:password@localhost:5432/schedule?schema=public
    SECRET_TOKEN=SECRET
    PARSER_URL=http://localhost:5000/api
  • Install the packages required for the project

    npm i
  • Generate Prisma Client

    npx prisma generate
  • Run Prisma migrations

    npx prisma migrate dev
  • Start the project with npm

    npm run dev
  • Request with curl

    http://localhost:8000/api/groups

Build

  • Open terminal and navigate to repository directory

    cd yet-another-schedule-app-backend
  • Install the packages required for the project

    npm i
  • Generate Prisma Client

    npx prisma generate
  • Make production build with npm

    npm run build

How to run in Docker

  • Download & Install Docker / Docker Desktop

  • Clone this repository

    git clone https://github.com/saizaax/yet-another-schedule-app-backend
  • Open terminal and navigate to repository directory

    cd yet-another-schedule-app-backend
  • Add .env file to root directory / Edit docker-compose.yml environment variables

    PORT=8000
    DATABASE_URL=postgresql://username:password@localhost:5432/schedule?schema=public
    SECRET_TOKEN=SECRET
    PARSER_URL=http://localhost:5000/api
  • Run docker-compose

    docker-compose up --build --detach
  • Request with curl

    http://localhost:8000/api/groups

About

Backend — Yet Another Schedule App

https://github.com/saizaax/yet-another-schedule-app


Languages

Language:TypeScript 97.0%Language:Dockerfile 3.0%