/note-app-backend

A simple note taking app, made for practice purposes.

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Note App (Back End)

Note app banner

Build Status Coverage Status GitHub license Code Style

Rest API for a simple note taking app. The goal of this project is to improve my web development skills with JavaScript.


Description

The API was developed using Node.js and the web framework Express. It uses MongoDB as database with Mongoose for connection. Mocha and Chai are used for the automated tests, together with the tools Factory girl, Faker and Supertest. Airbnb's code style was adopted and ESLint is used for code analysis.

How to use

First, you will need to clone the repo: git clone https://github.com/PauloRSF/note-app-backend.git. Then, you can install everything manually or use the dockerfile provided.

Running manually:

Dependencies:

You will need:

After you install everything, enter the project's directory and run:

$ yarn install
$ yarn dev

This should run nodemon which will run the app and keep watching for changes you make in any file. If you don't have a 'PORT' environment variable set, it will run on port 2100.

Using dockerfile:

To use the dockerfile attached:

(Optional) If you don't have MongoDB running on your machine:

$ docker run -d -p 27017:27017 mongo

Then, run the commands:

$ docker build -t note-app .
$ docker run -d --net=host note-app

Running tests:

To run the tests, execute: yarn test