Jams with friends and strangers in realtime.
RMX allows you to play music people around the globe in near realtime.
TODO
TODO
Clone this repo and grab all the necessary dependencies.
$ git clone [email protected]:Rapidmidiex/rmx.git
$ cd rmx
$ go mod tidy
POSTGRES_URL=[postgres://user:password@host:5432/rmx?sslmode=disable]
# Optional
PORT=8080 # Default
$ go run ./cmd/server
Copy env.example
to .env.development
and fill in the variables.
$ cp env.example .env.development
Run "Start App Server" debugger configuration.
TODO
You can use make
and docker
for easy local Postgres setup. Any of the variables can be overridden by passing the variable as an argument to make
.
$ make PG_PASSWORD=hotdog postgres
If any variables are changed, be sure to update your POSTGRES_URL
connection string accordingly.
- Create Postgres 14.6 container
$ make postgres
- Create database
$ make createdb
- Drop database
$ make dropdb
- Run Up migrations
$ make migrateup
- Run Down migrations
$ make migratedown
We use sqlc to generate type-safe Go code from raw SQL. The SQL queries are defined in internal/db/query
. The generated Go code is output to internal/db/sqlc
.
After adding up updating any SQL, regenerate the Go code using the make command:
$ make sqlc
We do not use database mocks and test against a real database. By default dockertest is used to create and tear down a Postgres database for testing.
If you wish to use your own database, supply the TEST_POSTGRES_URL
environment variable when running the tests.
$ go test ./...
When contributing to this repository, please first discuss the change you wish to make via issue, Slack, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
- Ensure any install or build dependencies are removed before the end of the layer when doing a build.
- Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
- You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4
For open source projects, say how it is licensed. Commonly used open-source licenses are MIT and Apache.