Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perebaj/ondehj
https://github.com/perebaj/ondehj
Last synced: about 6 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/perebaj/ondehj
- Owner: perebaj
- Created: 2023-04-20T23:26:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-29T11:46:06.000Z (over 1 year ago)
- Last Synced: 2024-06-21T18:47:57.478Z (5 months ago)
- Language: Go
- Size: 16.6 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Onde Hoje ?
A Single place to share the underground
Onde Hoje is an innovative application that allows users to share underground events in their city. This app is designed for people who are looking for unique experiences and want to explore the hidden gems of their city.
With Onde Hoje, users can find events that are not advertised on mainstream platforms such as Facebook or Instagram. This app is perfect for those who want to discover new artists, musicians, and performers before they become mainstream.
To run the API locally and start shipping 🚢 new features is easy:
```bash
# start running the development environment. For now, a PostgreSQL database.
make dev/start
```After that, to run the API, apply the command:
```go
go run cmd/ondehoje/main.go
```# API Requests
Just access your browser at http://localhost:8000/docs. That's it, all routes grouped in one place!
# Core Concepts
Some concepts that this simple API will build under:* API
* Database
* Database Migration
* Structured Logs
* Dev Container environment
* Go Unit test
* Metrics
* Swagger/OpenAPI## Structured Logs
It's important for each route that will be created, to pay attention to instantiate the right context logs and pass this object forward for each chain of code, including thirty implementations, like database interaction. The current routes already are following this pattern.# Heroku Database
Before connecting to the PostgreSQL database, make sure you have the [Heroku CLI installed](https://devcenter.heroku.com/articles/heroku-cli)
```bash
sudo apt-get install postgresql #to install psqlheroku pg:psql -a ondehoje # to access database and execute admin commands
```# Ship New code to production
Although there is a CI for that, it's possible to SHIP🚀 new code to production just using your machine.
Just run the following commands, in this order, and be happy😃:
```
make image
make publish
make heroku/release```
# Useful Vscode extensions
[OpenAPI Swagger Editor](https://42crunch.com/tutorial-openapi-swagger-extension-vs-code/)