https://github.com/josemarluedke/api-go
https://github.com/josemarluedke/api-go
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/josemarluedke/api-go
- Owner: josemarluedke
- Created: 2017-09-27T05:59:57.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-30T04:38:05.000Z (about 8 years ago)
- Last Synced: 2025-03-28T20:15:31.104Z (7 months ago)
- Language: Go
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API
Api written in Golang.
## Usage
Start the server:
```gin run server.go```
## Migrations
We use [go-pg/migrations](https://github.com/go-pg/migrations) to control our database migrations, such as creating, changing and dropping tables & fields.
There will be a table called `gopg_migrations` that saves all the executed migrations.
To setup the migrations table, execute:
```go run db/migrations/*.go init```
To run migrations, execute:
```go run db/migrations/*.go up```
To revert the last migration, execute:
```go run db/migrations/*.go ```