https://github.com/nafisfaysal/goapi
https://github.com/nafisfaysal/goapi
docker docker-compose docker-image dockerfile go golang golang-application golang-examples golang-library golang-module golang-router golang-server golang-tools google
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nafisfaysal/goapi
- Owner: nafisfaysal
- Created: 2019-02-26T11:59:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-19T05:43:57.000Z (about 6 years ago)
- Last Synced: 2025-05-12T19:09:41.054Z (about 1 year ago)
- Topics: docker, docker-compose, docker-image, dockerfile, go, golang, golang-application, golang-examples, golang-library, golang-module, golang-router, golang-server, golang-tools, google
- Language: Go
- Size: 11.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GoAPI
I challenge myself to build a web application without using any Go framework. I used Gorilla toolkit and GORM to build this application follow up with the MVC Framework pattern.
## To run the project
Create `.env` and run `docker-compose up`
## Dependencies
* go 1.13
* PostgreSQL : As data storage
* Docker
* Docker Compose
## ENV
```
POSTGRES_URL=postgres://postgres:yourpassword@postgres/postgres?sslmode=disable`
PORT=8080
```
## Run complete system
```
docker-compose up -d
```
## Endpoints
Name("HomePage").
Methods("GET").
Path("/").
Name("ServeSignupForm").
Methods("GET").
Path("/register").
Name("RegisterAccount").
Methods("POST").
Path("/register").
Name("ServeLoginForm").
Methods("GET").
Path("/login").
Name("Login").
Methods("POST").
Path("/login").
Name("Logout").
Methods("GET").
Path("/logout").
Name("ServePhoneBookList").
Methods("GET").
Path("/phonebooks").
Name("ServeNewPhoneBookForm").
Methods("GET").
Path("/phonebooks/new").
Name("CreatePhoneBook").
Methods("POST").
Path("/phonebooks/new").
Name("ServeUpdatePhoneBookForm").
Methods("GET").
Path("/phonebooks/{id:[0-9]+}/edit").
Name("UpdatePhoneBook").
Methods("POST").
Path("/phonebooks/{id:[0-9]+}/edit").
Name("DeletePhoneBook").
Methods("POST").
Path("/phonebooks/{id:[0-9]+}/delete").