Skip to content

An example for a blog app made with the Goyave REST API framework

License

Notifications You must be signed in to change notification settings

go-goyave/goyave-blog-example

Repository files navigation

Goyave Logo Goyave Logo

Goyave Blog Example

https://github.com/go-goyave/goyave-blog-example/actions

This example project was created to demonstrate a simple application built with Goyave including CRUD operations, authentication, routing, pagination, and more. With this application, users can register, login and write blog posts (articles) or read the other user's ones.

Running the project

First, make your own configuration for your local environment.

  • Copy config.example.json to config.json.
  • Start the database container with docker compose up.
  • Run migrations with dbmate: dbmate -u postgres://dbuser:secret@127.0.0.1:5432/blog?sslmode=disable -d ./database/migrations --no-dump-schema migrate
  • Run go run main.go in your project's directory to start the server. If you want to seed your database with random records use the -seed flag: go run main.go -seed. Users will all be created with the following password: p4ssW0rd_

Resources