I am building a golang backend and a react front end spa mainly as a learning experience
At the moment it is pointing at a local Postgres server, I used this godaddy tutorial for setting up postgres
table setup
# log into postgres
psql -U postgres -W
Password for user postgres:
# create the table
postgres=# CREATE TABLE apps ( ID SERIAL PRIMARY KEY, Appname TEXT, Disabled boolean, GlobalDisableMessage TEXT); Optional install pgAdmin to view the local database see
For the moment there is only The golang api server setup, standard golang setup
go get -u github.com/austincunningham/go-react
cd $GOPATH/src/github.com/austincuningham/go-react
dep ensure
go run main.goServer is served on 8001 so
http://localhost:8001/ will return hello world
- GET
/appsGet all apps in apps table - GET
/apps/:idGet an app by id in apps table - PUT
/apps/:idUpdate an app in apps table - POST
/appsCreate an new app in apps table - DELETE
/apps/:idDelete an app in apps table