notes

command module
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 1 Imported by: 0

README

About The Project

This is a backend application for a notes app, developed using Go. The API supports both REST and GraphQL communication. While the application is designed to be simple in terms of business logic, it serves as a robust example of a Go project structure. It is intended to be a solid starting point for more complex applications.

Built With

How to test

  1. Install Docker
  2. Install Postman from here.
  3. Download the api postman collection here

Setup for development

  1. Install Go 1.22.4
  2. Install Docker
  3. Install direnv to export the environment variables. (only for development)
  4. Clone the repo
    git clone https://github.com/daniarmas/notes.git
    
  5. Install Go dependencies
    go mod download
    
  6. Deploy docker compose file
    docker compose -f deploy/docker-compose-dev.yaml up -d
    
  7. Run direnv command to approve his content
    direnv allow
    
  8. Create the .envrc file with the env vars in example.envrc
  9. cp example.envrc .envrc
    
  10. Create the database tables
go run main.go create database
  1. Seed the database. This seed the database for test purpose
go run main.go create seed
  1. Configure an object storage service compatible with the Amazon S3 API. DigitalOcean Spaces was used in the development. Ensure you update the access key, secret key and bucket name in the .envrc file.
  2. Run the app
go run main.go run

Documentation

After completing step 3 in the Setup for development section, go to http://localhost:8081 to open Swagger UI.

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Contact information

Acknowledgments

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL