Giter Club home page Giter Club logo

prest's Introduction

RESTful API pREST

Build Status GoDoc Go Report Card codecov SourceLevel Homebrew Slack

pREST (PostgreSQL REST), simplify and accelerate development, instant, realtime, high-performance on any Postgres application, existing or new

PostgreSQL version 9.4 or higher

Contributor License Agreement - CLA assistant

pREST - instant, realtime, high-performance on PostgreSQL | Product Hunt

Problem

There is PostgREST written in Haskell, but keeping Haskell software in production is not an easy job. With this need pREST was born. Read more.

Test using Docker

To simplify the process of bringing up the test environment we will use docker-compose

# Download docker compose file
wget https://raw.githubusercontent.com/prest/prest/main/docker-compose-prod.yml -O docker-compose.yml

# Up (run) PostgreSQL and prestd
docker-compose up
# Run data migration to create user structure for access (JWT)
docker-compose exec prest prestd migrate up auth

# Create user and password for API access (via JWT)
## user: prest
## pass: prest
docker-compose exec postgres psql -d prest -U prest -c "INSERT INTO prest_users (name, username, password) VALUES ('pREST Full Name', 'prest', MD5('prest'))"
# Check if the user was created successfully (by doing a select on the table)
docker-compose exec postgres psql -d prest -U prest -c "select * from prest_users"

# Generate JWT Token with user and password created
curl -i -X POST http://127.0.0.1:3000/auth -H "Content-Type: application/json" -d '{"username": "prest", "password": "prest"}'
# Access endpoint using JWT Token
curl -i -X GET http://127.0.0.1:3000/prest/public/prest_users -H "Accept: application/json" -H "Authorization: Bearer {TOKEN}"

Want to contribute to the project and don't know where to start? See our contribution guide here.

1-Click Deploy

Heroku

Deploy to Heroku and instantly get a realtime RESTFul API backed by Heroku Postgres:

Deploy to Heroku

Documentation

https://docs.prestd.com/ (content source and template source)

prest's People

Contributors

avelino avatar felipeweb avatar crgimenes avatar henriquechehad avatar marioidival avatar tiaguinho avatar lerrua avatar cassiobotaro avatar dependabot[bot] avatar arxdsilva avatar joelmdesouza avatar andrewsmedina avatar fabriziomello avatar bege13mot avatar matheusfrancisco avatar jtemporal avatar sebastianwebber avatar tarnowsc avatar ccamel avatar imgbotapp avatar kemelzaidan avatar louis77 avatar rekgrpth avatar benoitdm-oslandia avatar chenrui333 avatar rafamarquesrmb avatar xulien avatar wevtimoteo avatar khalifeserge avatar norris1z 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.