Skip to content

dvinciguerra/ruby-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Microservices

Using the services

Auth

POST /v1/auth

Command:

curl -XPOST "http://localhost:3001/v1/auth" -d $'{ \
  "email": "eminetto@gmail.com", \
  "password": "1234567" \
}'

Result Example:

{
  "token": "Authorization:eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjFiYmFlY2Q3LTBhOWUtNGY1NS1iMjVjLTYyMTc0ODYxNWZiZSIsImVtYWlsIjoiZGV2QGV4YW1wbGUub3JnIiwicGFzc3dvcmQiOiJ0ZXN0In0.6nYYTW_vsd6CbPttyEXqlz1kdCAiceqUy3j4RvtNQI4"
}

Services

POST /v1/services

Command:

curl -XPOST "http://localhost:3002/v1/services" \
  -H 'Authorization:eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjFiYmFlY2Q3LTBhOWUtNGY1NS1iMjVjLTYyMTc0ODYxNWZiZSIsImVtYWlsIjoiZGV2QGV4YW1wbGUub3JnIiwicGFzc3dvcmQiOiJ0ZXN0In0.6nYYTW_vsd6CbPttyEXqlz1kdCAiceqUy3j4RvtNQI4' \
  -d $'{ \
		"type": "compute", \
		"size":"micro 2x", \
		"preferences":{ \
			"storage":{ \
				"type":"ssd", \
				"size":"512G" \
			} \
		} \
	}'

Result Example:

{
	"type":"compute",
	"size":"micro 2x",
	"preferences": {
		"storage": {
			"type":"ssd",
			"size":"512G"
		}
	}
}

About

Ruby simple microservices project made using sinatra

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published