Code Monkey home page Code Monkey logo

vidly-api-test's Introduction

Vidly API Demo

Description

Node.js project utilizing Mongoose MongoDB connection and CRUD methods to simulate a movie rental application.

Table of contents

Installation

To start using this code follow these instructions:
Install the required dependencies using the follow command in the terminal under to root file directory.

npm i

Usage

A MongoDB database profile must be made in order for data to be saved/retrieved.
Once your MongoDB profile is set up run the following command in your terminal IDE to launch the server.

nodemon

If met with the error...

[nodemon] app crashed - waiting for file changes before starting...

...the enviromental variable for the server key must be set based on your OS.

macOS/Linux:

export vidly_jwtPrivateKey={yourPrivateKey}

Windows:

set vidly_jwtPrivateKey={yourPrivateKey}

Credit

None

Tests

This application uses Jest for test exercises. To setup Jest run the following command within the root folder of the application in your terminal:

npm i jest --save-dev

Once the Jest package is installed procced to your package.json file and navigate to: "scripts" > "test" changing it to jest --watchAll. Your scripts should look like:

"scripts": {
    "test": "jest --watchAll"
  },

With --watchAll Jest will watch for code changes and rerun tests whenver a code change is made and saved. If this feature is not desired remove the --watchAll flag.
Tests can be written and organized based on their type within the tests directory under the appropriate directory/sub-directory.
To execute your tests open up a terminal within the project and run:

npm test

Jest will run all test suites and display a pass or fail result in the terminal.

GitHub

GeloneJT

Email

[email protected]

Questions

GitHub / Email

License

License: MIT

vidly-api-test's People

Contributors

gelonejt 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.