Code Monkey home page Code Monkey logo

microapi-main-website's Introduction

Team-Microapi

Node.js CI

Overview ๐Ÿ“”

This is a the microdev.api website designed by Team-Incredibles. Currently under constructuin by Team-Microapi

Installation and running server โš™๏ธ

  • Clone the repo to your local machine using your terminal or command prompt, and afterwards, navigate into the root folder
$ cd microapi-main-website
  • Install necessary dependencies for the project to run successfully
$ yarn install
  • After installing, you can now start the server
$ yarn start
Listening on port 3000

point your browser to localhost:3000

API ๐ŸŒฉ๏ธ

Two API's were consumed for the development of this project

  • Login API
  • Registration API

To see the test written for these api, run this command in your command line

yarn test

The test is targeted at the ./test/unit/** folder

Test written ๐Ÿ’ก

Login ๐Ÿ”‘

    Test the login page
        Test to cheeck if email and password exists
            Signing in with a verified email and password
                โœ“ should respond 200
            Signing in with an unerified email and password
            โœ“ should respond with 404

Signup ๐Ÿšช

  Test the signup page
    Test to check if all fields
      โœ“ should verify if all fields are entered correctly
      โœ“ verify if it sends an error message if 
        all fields are empty

    Test to check if password mactch
      โœ“ should return false if password and 
        confirmpassword don't match
      โœ“ should return true if password and 
        confirmpassword don't match
      
    Test to check if password fiels is not empty
      โœ“ verify if it sends an error message if 
        password field is empty

    Test to check if email is a valid email
      โœ“ should return false if email is invalid
      โœ“ should return true if email is valid'

    Test to check if email field is not empty
      โœ“ verify if it sends an error message if email field is
        not filled and entered
    
    Test to check if email is not in right format
      โœ“ verify if it sends an error message if email field is not
        in the right format

Docker โœณ๏ธ

So, the server is running on a linux os, and containerized with docker.
The following steps needs to be taken

  • Run a $ ls -al command to see if run_docker.sh is available in the projests' parent directory

  • Edit run_docker.sh with the nano command by inputting your desired name and port number in variables IMAGENAME and Port $ nano run_docker.sh

  • Make run_docker.sh an executable $ chmod +x run_docker.sh which is in the project home directory

  • Edit your Nginx conf to proxy off localhost:PORT in location block where PORT (e.g 3000) is nodejs system default programmed port as found in the config.js file

     location / {
                    proxy_pass http://localhost:Port;
            }
    
  • Execute the run_doker.sh file $ ./run_docker.sh

Links ๐Ÿ”—

Contributors ๐Ÿ“–

  • Team-Incredible, Team-Microapi ๐Ÿค“

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.