Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 958 Bytes

README.md

File metadata and controls

51 lines (34 loc) · 958 Bytes

Radioju API

  • Brain of my Radioju app, developed with express.js

Requirements

  • Docker

Server Configuration

Start:

# run docker container in development mode
yarn docker:dev

# run docker container in production mode
yarn docker:prod

Backup & Restore:

# run mongodump and create backup radioju collections
docker exec -i <container-name> /usr/bin/mongodump --uri=mongodb://mongodb:27017/radioju --out /dump

# Copy to backup output folder to host root directory
docker cp <container-name>:/dump /root/dump

# Copy to backup folder to new mongodb container
docker cp /root/dump <container-name>:/dump

# Restore backup
docker exec -i <container-name> /usr/bin/mongorestore --uri=mongodb://mongodb:27017/radioju /dump/radioju

Linting:

# run ESLint
yarn lint

# fix ESLint errors
yarn lint:fix

# run prettier
yarn prettier

# fix prettier errors
yarn prettier:fix