Code Monkey home page Code Monkey logo

circle-cicd's Introduction

Simple Todo App with MongoDB, Express.js and Node.js

The ToDo app uses the following technologies and javascript libraries:

  • MongoDB
  • Express.js
  • Node.js
  • express-handlebars
  • method-override
  • connect-flash
  • express-session
  • mongoose
  • bcryptjs
  • passport
  • docker & docker-compose

What are the features?

You can register with your email address, and you can create ToDo items. You can list ToDos, edit and delete them.

How to use

First install the depdencies by running the following from the root directory:

npm install --prefix src/

To run this application locally you need to have an insatnce of MongoDB running. A docker-compose file has been provided in the root director that will run an insatnce of MongoDB in docker. TO start the MongoDB from the root direction run the following command:

docker-compose up -d

Then to start the application issue the following command from the root directory:

npm run start --prefix src/

The application can then be accessed through the browser of your choise on the following:

localhost:5000

Testing

Basic testing has been included as part of this application. This includes unit testing (Models Only), Integration Testing & E2E Testing.

Linting:

Basic Linting is performed across the code base. To run linting, execute the following commands from the root directory:

npm run test-lint --prefix src/

Unit Testing

Unit Tetsing is performed on the models for each object stored in MongoDB, they will vdaliate the model and ensure that required data is entered. To execute unit testing execute the following commands from the root directory:

npm run test-unit --prefix src/

Integration Testing

Integration testing is included to ensure the applicaiton can talk to the MongoDB Backend and create a user, redirect to the correct page, login as a user and register a new task.

Note: MongoDB needs to be running locally for testing to work (This can be done by spinning up the mongodb docker container).

To perform integration testing execute the following commands from the root directory:

npm run test-integration --prefix src/

E2E Tests

E2E Tests are included to ensure that the website operates as it should from the users perspective. E2E Tests are executed in docker containers. To run E2E Tests execute the following commands:

chmod +x scripts/e2e-ci.sh
./scripts/e2e-ci.sh
This project is licensed under the MIT Open Source License

circle-cicd's People

Contributors

ben-ashby avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.