Simple mini framework for creating REST API using GoLang.
Clone the framework
git clone https://github.com/ecojuntak/gorb.git
Create your configuration file first
cp config.example.yaml config.yaml
APP_NAME: GO-REST
PORT: 8000
HOST: localhost
For your database, you can use MySQL, Postgresql, and SQLite3.
DB_DRIVER: mysql
DB_HOST: 127.0.0.1
DB_PORT: 3306
DB_NAME: gorest
DB_USERNAME: username
DB_PASSWORD: secret
DB_DRIVER: postgres
DB_HOST: 127.0.0.1
DB_PORT: 5342
DB_NAME: gorest
DB_USERNAME: username
DB_PASSWORD: secret
DB_POSTGRES_SSL_MODE: disable
For SQLite3, you need to create your database file first.
touch model/database.db
Then update your configuration file. You only need to set the DB_DRIVER and DB_NAME
DB_DRIVER: sqlite3
DB_NAME: model/database.db
To run the migration
go run *.go migrate
To run the seeder
go run *.go seed
To start the unit test
go test ./...
To start the server
go run *.go start
Pull requests are welcome!
Cappy Hoding!