diff --git a/.gitignore b/.gitignore index 3a71d8f..ac8762f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ /textsender-auth + .env +.env.local + /vendor diff --git a/README.md b/README.md index a865b53..8a8eb04 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ # textsender-auth -A service that handles the authorization aspect of the textsender project. \ No newline at end of file +A service that handles the authorization aspect of the textsender project. + + +## Getting started +Assumes that the postgresql database has already been created with privileges to +create and drop databases. Copy the `.env.sample` file to `.env`. Within the `.env` +file, update the database keys. The `SECRET_KEY` is used for token generation. + + +### Building api +``` +go build -o textsender-auth cmd/api/main.go +``` + + +### Resetting the database +``` +./textsender-auth -reset-db +``` diff --git a/version/version.go b/version/version.go new file mode 100644 index 0000000..874433c --- /dev/null +++ b/version/version.go @@ -0,0 +1,7 @@ +package version + +var ( + Version = "dev" + Commit = "none" + Date = "unknown" +)