Skip to content

fujitsu-cf/cf-test-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cf-test-postgres

This is simple test application for CF. The cf-test-postgres connects to PostgreSQL database and creates REST endpoints for adding and retrieving data to/from database.

Configuration

In main.go you can find consts for database connection

const (
	host     = "10.0.0.4"
	port     = 5432
	user     = "postgres"
	password = "password"
	dbname   = "postgres"
)

Deployment

cf push cf-test-postgres -u process

How to add new entry to database

curl -X POST -H "Content-Type: application/json" -d '{"name":"John","surname":"Doe", "age":23, "email":"[email protected]", "avatar":"svg-1"}' http://cf-test-postgres.domain/user

How to get all data

curl http://cf-test-postgres.domain/users

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages