Giter Club home page Giter Club logo

article-auth-api's Introduction

Hire Dev API

Setting up the env variables

Create .env file and pass in the next values:

DM me for the key values

DB=mongodb://localhost:27017/hiredev
SECRET_KEY=xxxxx
REACT_APP_URL='http://127.0.0.1:3000'
NODE_ENV=dev
SENDGRID_API_KEY=xxxxxx

Installation

  1. yarn
  2. Start database: yarn database
  3. Start the dev server: yarn dev

Replace mongo-data with the name of the folder your data is stored within the npm scripts.

Models

User

  • firstName
  • lastName
  • username
  • email
  • password
  • tokens

Routes

  • User
POST /api/user/register
// Register a new user and returns user data with the generated token
// Public

POST /api/user/login
// Login user and returns user data with the generated token
// Public

DELETE /api/user/logout
// Logout
// Private

POST /api/user/resend/email
// Resend email to confirm account
// Private

GET /api/user/verify
// Verifies token is not expired
// Private

PATCH /api/user/email/confirm
// Confirms email
// Private

PATCH /api/user/reset/password
// Resets password
// Private

POST /api/user/forgotten/password
// Sends email to reset password
// Private

POST /api/user/users/all
// Returns all registered users
// Public

POST /api/user/users/total
// Returns total registered users
// Public

POST /api/user/:id
// Returns specific user
// Public

PATCH /api/user/edit
// Edits user account
// Private

PATCH /api/user/follow/:id
// Follow another user
// Private

PATCH /api/user/unfollow/:id
// Unfollow another user
// Private

PATCH /api/user/edit
// Edits user account
// Private

article-auth-api's People

Contributors

dependabot[bot] avatar smakosh avatar

Stargazers

 avatar

Watchers

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