Skip to content
API REST build in java with jersey and hibernate
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.travis.yml
Procfile
README.md
create.sql
pom.xml
prsoft.sql
receticas.iml
run.sh
system.properties

README.md

Server Build Status

Required

  • openjdk8 or oraclejdk8
  • Apache Maven 3.3.9
  • git

Install

$ git clone https://github.com/Grace-Hopper/Server.git
$ cd Server

If you are using an IDE just import maven project and search for pom.xml

Run

$ ./run.sh

Test with curl

$ curl -H "Content-Type: application/json" -H "Authorization: admin" -i http://localhost:8080/api/user # GET user by name
$ curl -H "Content-Type: application/json" -i http://localhost:8080/api/user/login --data '{"name":"test","password":"test"}' # POST login user
$ curl -H "Content-Type: application/json" -i http://localhost:8080/api/user/signup --data '{"name":"test","password":"test"}' # POST user named test and pass test
$ curl -H "Content-Type: application/json" -H "Authorization: <username>" -i http://localhost:8080/api/recipes # GET all recipes
$ curl -H "Content-Type: application/json" -H "Authorization: <username>" -i http://localhost:8080/api/recipe\?id\=78 # GET the recipe with id = 78
You can’t perform that action at this time.