A little MySQL database to manage users.
You need Docker or MySQL installed and check that mytap is a submodule and it is in the project folder. Also you need Go installed with the following dependencies:
If you are using Docker go to the project folder and execute:
~/path_to_the_project$ ./initDocker.sh
In this file you can find the configuration of the MySQL server, feel free to modify it. Then execute:
~/path_to_the_project$ ./initsql.sh
This file just sets up the database by default in the Docker machine. If you changed the configuration previously you must change it in this file or specify in the second parameter:
~/path_to_the_project$ ./initsql.sh '' mysql.ip
Installing dependencies:
~/path_to_the_project$ ./installDependencies.sh
Once the database is set up and the dependecies installed, build and run the server.go
file.
~/path_to_the_project$ go build server.go
~/path_to_the_project$ ./server
To run the tests just execute de initsql
script with the -t
flag:
~/path_to_the_project$ ./initsql.sh -t
Like the previous step this tries to execute the tests in the Docker machine. You can change the ip by parameter:
~/path_to_the_project$ ./initsql.sh -t mysql.ip
To test the server integrated with the database run the tests with -database
flag:
~/path_to_the_project$ go test ./... -v -database
Once the system is installed you can start it by executing the following commands:
~/path_to_the_project$ go build server.go
~/path_to_the_project$ ./server
You can find the API reference in the wiki.
- httprouter - Routing.
- MySQL driver - MySqlDriver.
- Configuration - Configuration stuff.
- JWT - Building JWT.
- BCrypt - BCrypt security.
- GoConvey - Makes testing quick & easy.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Github
- Aarón Sánchez Navarro - Initial work - Sessionmanager
This project is licensed under the MIT License - see the LICENSE.md file for details