Giter Club home page Giter Club logo

auth-api's Introduction

auth-api

express api server with basic and bearer authentication and AccessControlList using mongoDb bcrypt and base-64

Author: Fizzo Pannosch

Version: 1.0.0

links and resources

app is working on swagger app is working on swagger app is working on swagger app is working on swagger

UML DIAGRAM

web request response cycle diagram 001 web request response cycle diagram 002 web request response cycle diagram 003

Overview

building a basic express server with node.js. Writing our own tests with supertest and jest.

Setup

git clone repo from github link: https://github.com/fizzo999/auth-api.git

.env requirements PORT - Port Number

npm install (to install dependencies: express, dotenv, supertest, jest)

Running the app npm start Endpoint: /clothes for a list of items and /clothes/1 for the 1st item Endpoint: /food for a list of food items and /food/1 for the 1st food item

Returns Array of Objects in case of GET Returns success message in case of POST Returns the updated object in case of PUT Returns success message in case of DELETE

Tests Unit Tests: npm run test

Architecture

node.js based server that uses express library and dotenv package tests performed with jest and supertest

Change Log

04-28-2021 10:59pm - Application now has a fully-functional express server, with POST route ('/signup') and ('/signin') endpoints, mongodb working locally on my own machine. Also have AccessControlList implemented by meregin the two starter codes and changing the v2 routes (exact copy of v1 routes) to add middleware function call with (capabilities) as argument - thereby checking the token encrypted sign-in authorization status (user, editor or admin) against the virtual db field of .capabilities of that specific user that just signed back in.

Credits and Collaborations

Number and name of feature: setup file structure, write server.js, index,js, 404.js, 500.js, test.js.yml - repo on github and deploy to heroku Estimate of time needed to complete: 2 hours Start time: 4:00 pm Finish time: 7:00 pm Actual time needed to complete: 3 hours

Number and name of feature: food routes and data model, bug fix, readme.md Estimate of time needed to complete: 2 hours Start time: 8:00 pm Finish time: 11:00 pm Actual time needed to complete: 3 hours

auth-api's People

Contributors

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