Closed Jean-Baptiste-Lasselle closed 4 years ago
git clone git@github.com:pegasus-io/lets-go.git ~/lets-go cd ~/lets-go git flow init --defaults && git push -u origin --all
export FEATURE_ALIAS='article1' git flow feature start ${FEATURE_ALIAS} && git push -u origin --all
export COMMIT_MESSAGE="feat(${FEATURE_ALIAS}) : adding golang source code #2"
git add --all && git commit -m "${COMMIT_MESSAGE}" && git push -u origin HEAD
* In you workspace, execute : ```bash export PATH=$PATH:/usr/local/go/bin go mod init pegasus-api go get github.com/gorilla/mux # And then I added the source code present in release 0.0.1
go run main.go
# # Now try in another shell session, try : curl -iv http://localhost:10101/api/v1 # # or curl -iv http://localhost:10101/api/v1 | tail -n 1 | jq # curl -iv -X POST http://localhost:10101/api/v1 | tail -n 1 | jq # curl -iv -X PUT http://localhost:10101/api/v1 | tail -n 1 | jq # curl -iv -X PATCH http://localhost:10101/api/v1 | tail -n 1 | jq # curl -iv -X DELETE http://localhost:10101/api/v1 | tail -n 1 | jq # curl -iv -X OPTIONS http://localhost:10101/api/v1 | tail -n 1 | jq # curl -iv -X POST http://localhost:10101/api/v1/user/544543434/comment | tail -n 1 | jq # curl -iv -X GET http://localhost:10101/api/v1/user/544543434/comment/45446464634 | tail -n 1 | jq
done with 0.0.1
Building a REST API in Golang
export FEATURE_ALIAS='article1' git flow feature start ${FEATURE_ALIAS} && git push -u origin --all
export COMMIT_MESSAGE="feat(${FEATURE_ALIAS}) : adding golang source code #2"
git add --all && git commit -m "${COMMIT_MESSAGE}" && git push -u origin HEAD