ahmadyusri / booking-app-nodejs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Started

Booking APP using NodeJS with Framework AdonisJS

Manual Deployment

Install Package

yarn install
# or
npm install

Copy Environment

cp .env.example .env

Run Development

yarn dev
# or
npm run dev

Open http://localhost:3333 to view it in the browser.

Run Production

## Build
yarn build
# or
npm run build

## Enter build folder
cd build/

## Install Package
yarn install
# or
npm install

## Start
yarn start
# or
npm run start

Open http://localhost:3333 to view it in the browser.

Running Migration

node ace migration:run

Start Queue

node ace bull:listen

Docker Deployment

Optional Build and Run Additional Image Redis and Mysql

make docker_build_additional_image
# or
docker-compose -f docker-compose-additional.yml --env-file .env.production up -d

Prepare environment test and production

# Copy default env
cp .env.example .env.production

# Update .env.production
nano .env.production

# Update .env.test
nano .env.test

# Update redis, mysql config to success running test

Build and Run Image

make run
# or
docker-compose --env-file .env.production up -d

Update docker-compose.yml if redis and mysql host to container when running test

# Add services.app.build to
network: booking_app_network

# If error `Error response from daemon: network mode "booking_app_network" not supported by buildkit`
# set DOCKER_BUILDKIT to false

DOCKER_BUILDKIT=0 make run
# or
DOCKER_BUILDKIT=0 docker-compose --env-file .env.production up -d

Testing

node ace test

Live Demo

  • Open Live Demo to view it in the browser.
  • Postman Collection Restful API click to view it in the browser.

Next Tasks

  • ✅ Simple Auth
  • ✅ Simple Booking Process
  • ✅ Simple Article Feature
  • ✅ Send Reminder 20 Minutes before Booking Time when Booking Time After 30 Minutes from Now
  • ✅ Delete Reminder on Booking delete/cancel
  • ⬜️ Unit Test
  • ⬜️ Separation of message broker to another service
  • ⬜️ User Permission Admin and Customer

About


Languages

Language:TypeScript 98.6%Language:Shell 0.6%Language:Dockerfile 0.5%Language:Makefile 0.2%