Make sure to copy config_dist.json to config.json and fill it with the necessary values. The following fields are numerical, so you would like to remove the quotes and put a number there: crypt_cost jwt_expiration
There are a couple of dependencies you would like to go get before building the project: golang.org/x/crypto/bcrypt github.com/dgrijalva/jwt-go
There are some endpoints that are protected under JWT validation. This JWT needs to be sent as a header under the name Token. Expect a 401 http status code in case the token was not validated successfully.
If something unexpected happens while processing your request, expect a 500 http status code as a response.
Make a GET request to this endpoint to check the healthiness of the application, this implies DB connection check as well.
Make a POST request to this endpoint with the following JSON structure:
{
"email": "email@domain.com",
"password": "userPassword"
}
Expect to receive the following response on success with a 200 http status code:
"user registered succesfully"
Expect a 400 http status code if the email is already registered.
Make a POST request to this endpoint with the following JSON structure:
{
"email": "email@domain.com",
"password": "userPassword"
}
Expect to receive the following object on success with a 200 http status code:
{
"message": "login successful",
"token": "JWT"
}
Use these steps to clone from SourceTree, our client for using the repository command-line free. Cloning allows you to work on your files locally. If you don't yet have SourceTree, download and install first. If you prefer to clone from the command line, see Clone a repository.
- You’ll see the clone button under the Source heading. Click that button.
- Now click Check out in SourceTree. You may need to create a SourceTree account or log in.
- When you see the Clone New dialog in SourceTree, update the destination path and name if you’d like to and then click Clone.
- Open the directory you just created to see your repository’s files.