Giter Site home page Giter Site logo

hackathon_back's Introduction

hackathon_back

For endpoints testing use => Deployed API: https://nea-server.herokuapp.com/

npm i to install node modules.

npm run seed to seed database with CSV file.

npm run dev to run in development.

findAll and addList are unprotected for both models(nea and user) thus you can check it without auth.

If you want to test the rest of endpoints use:
username: carlos - password: 1234 for login. This will return a token.
Or you can signup using the POST endpoint /api/auth this will return a token valid for 1 hour.

Use the token in your headers as x-auth-token and use Content-Type: application/json to access all the endpoints.

Endpoints>>>

Auth
POST: /api/auth to sign up
POST: /api/auth/login to log in
GET: /api/auth/loggedUser to check current logged user

NEAs
POST: /api/nea to add a list of neas (unprotected)
GET: /api/nea to get all neas (unprotected)
GET: /api/nea/:id to get specific nea
PUT: /api/nea/:id to update one nea
DELETE: /api/nea/:id to remove one nea

Users
POST: /api/user to add a list of users (unprotected)
GET: /api/user to get all users (unprotected)
GET: /api/user/:id to get one user
PUT: /api/user/:id to update a user (must be the one that is logged in)
DELETE: /api/user/:id to remove a user (must be the one that is logged in)

hackathon_back's People

Contributors

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