Skip to content

microapidev/core-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 🤓

About

The main website where you can sign up and do things

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published