Project Spiderweb - Service
License; use, modification, sharing, and distribution
This project does not have an Open Source license and its copyright is only extended to the specified authors.
You are not permitted to share the software.
You are not permitted to distribute the software.
You are not permitted to modify the software.
You are not permitted to use the software, except at its hosted URL.
You are, however, permitted to view and fork this repo.
You can read more about our permissions at https://choosealicense.com/no-permission/
If you want to get started on contributing, head over the Root Project Page and either check out the Issues or Projects. Not sure where to start? You can post your interest here and we'll get you started.
We keep a separate repo for Issues/Projects because the project spans more than one repo (front-end, back-end, etc). If there is an issue specific to only this project, you can just post an issue here.
Dependencies are installed using govendor until go2 is released.
go get -u github.com/kardianos/govendor
govendor fetch <same as "go get" path>
See the Go Getting Started page for details on how to set up your machine for Go development.
go get github.com/Pergamene/project-spiderweb-service
First, install testify, which is used for unit test mocks and assertions:
go get github.com/stretchr/testify.
To run the unit tests, you can run
go test ./....
If you're writing new unit tests, you'll likely need to install mockery to mock interfaces.
If you want to run the intregated tests against the db, make sure to:
- Set the env var
SETUP_SQL_FILEPATHto the filepath of where the db's setup.sql file is on your local machine:
- Have the database docker container running locally. Follow the README.md for instructions.
To build the app,
cd cmd/server and run
go build. This will create a
server executable that you can run
You'll then be able to hit the service at
http://localhost:8782 try hitting
http://localhost:8782/healthcheck to see the basic service is working or
http://localhost:8782/dbhealthcheck to see if it can successfully connect to the database.
Serving API Docs locally
The API docs can be accessed when the server is running locally at: