Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/captv89/calc
A Simple Calculator API written in Go powered by Buffalo.
https://github.com/captv89/calc
api buffalo calculator example go
Last synced: 4 days ago
JSON representation
A Simple Calculator API written in Go powered by Buffalo.
- Host: GitHub
- URL: https://github.com/captv89/calc
- Owner: captv89
- Created: 2021-06-24T17:37:03.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-06-25T19:18:06.000Z (over 3 years ago)
- Last Synced: 2024-06-19T18:01:41.528Z (5 months ago)
- Topics: api, buffalo, calculator, example, go
- Language: Go
- Homepage:
- Size: 80.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Welcome to Simple Calculator Built with Buffalo!
I chose Buffalo as prefered framework as it gives everything out of the box for newcomers like me. This is a simple Go (Golang) calculator with API.
Please ignore my immaturity in the coding. Any recomendations on improving the code is welcome. #LearningForEver
## Get Started
To Set the Development Enviornment afresh to start working runbuffalo new calc --api --skip-pop --module github.com/githubusername/calc
## Starting the ApplicationBuffalo ships with a command that will watch your application and automatically rebuild the Go binary and any assets for you. To do that run the "buffalo dev" command:
$ buffalo dev
If you point your browser to [http://127.0.0.1:3000](http://127.0.0.1:3000) you should see a "Welcome to Buffalo!" page.
**Congratulations!** You now have your Buffalo application up and running.
## What Next?
### To Add
Pass num1 and num2 in the path followed by add/.
Example
http://localhost:3000/add/3/4
This should give you an answer 7
### To Subtract
Pass num1 and num2 in the path followed by sub/.
Example
http://localhost:3000/sub/3/4
This should give you an answer -1
### To Multiply
Pass num1 and num2 in the path followed by mul/.
Example
http://localhost:3000/mul/3/4
This should give you an answer 12
### To Divide
Pass num1 and num2 in the path followed by div/.
Example
http://localhost:3000/div/8/4
This should give you an answer 2
Good luck!
[Powered by Buffalo](http://gobuffalo.io)