Giter Site home page Giter Site logo

api-express-db's Introduction

api-express-db

A project to build an API and connect it with a PostgreSQL database.

Package used

  • Prima: use to link postgreSQL DB with the server.
  • Express: use to create a server and APIs.

How you can use it.

Prerequirements

Its necessary have installed postgreSQL and create a DB, in this case the DB was named "explorers_api"

Start using

Ones you have this project in your own computer in the root of the project Run:

npm install

Create a .env file, you need to add the next line, modifying your postgresUser and your password

DATABASE_URL="postgresql://TUUSUARIO:PASSWORD@localhost:5432/explorers_api?schema=public"

If you want to try this project easier, you can use POSTMAN to run send HTTP request to the endpoint.

API endpoints

Type Route Body
Get explorers or users localhost:PORT/explorers or localhost:PORT/users Do not apply
Get explorer or user by ID localhost:PORT/explorers/id or localhost:PORT/users/id Do not apply
Create a new explorer or user localhost:PORT/explorers or localhost:PORT/users {name: name, username: username, mission: mission} or {name: name, lang: lang, missionComander: commander, enrollments: 1}
Update a explorer mission or user missionComander by ID localhost:PORT/explorers/1 or localhost:PORT/users/1 {mission: mission} or {missionComander: commander}
Delete a explorer or user by ID localhost:PORT/explorers/1 or localhost:PORT/users/1 Do not apply

api-express-db's People

Contributors

gustavolira-che 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.