Skip to content

Latest commit

 

History

History
110 lines (69 loc) · 2.54 KB

README.md

File metadata and controls

110 lines (69 loc) · 2.54 KB

Api STF

About

Package with the main server for STF system.

// Content below is generated by Feathers.js

Getting Started

Getting up and running is as easy as 1, 2, 3.

  1. Make sure you have NodeJS and yarn installed.

  2. Install your dependencies

  3. Start your app

    npm start
    

Testing

Simply run npm test and all your tests in the test/ directory will be run.

Scaffolding

Feathers has a powerful command line interface. Here are a few things it can do:

$ npm install -g @feathersjs/cli          # Install Feathers CLI

$ feathers generate service               # Generate a new Service
$ feathers generate hook                  # Generate a new Hook
$ feathers help                           # Show all commands

Help

For more information on all the things you can do with Feathers visit docs.feathersjs.com.


How to deploy and manage MongoDB with Docker

Download MongoDB image for Docker

Proceed to download the latest official Docker image for the MongoDB database:

docker pull mongo

List the images in your Docker repository with the following command:

docker images

Deploy MongoDB Container

Start the Docker container with the run command using the mongo image.

docker run -it -v $(pwd)/data/db:/data/db -p 27017:27017 --name mongodb -d mongo
  • -it – Provides an interactive shell to the Docker container.
  • -v – Use this option to attach the data host volume to the /data/db container volume.
  • -p - Set port for a docker and gateway. The default port number is 27017, but I set it for clarity.
  • -d – Starts the container as a background process.
  • --name – Name of the container.

Always check the Docker log to see the chain of events after making changes:

docker logs mongodb

Start Interactive Docker Terminal to Manage Database

The container is currently running in detached mode. Connect to the container using the interactive terminal instead:

docker exec -it mongodb bash

Start the MongoDB shell by typing mongo in the interactive terminal.

Stopping and Restarting MongoDB Database

The docker stop command is a short and clear command that stops running container instances:

docker stop mongodb

Inspect the list of running Docker containers by typing:

docker ps -a
  • -a - list all containers, both running and stopped

Containers are started by using the docker start command:

docker start mongodb