This is the backend response server and RESTful routing gateway for the WorkplaceX Project
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
There are a few things you will need to get this running on your local machine
This should install everything the apps need to run on your local machines.
cd workplace-api
make
Seed the items database (defaults to 97 records)
cd items-server
npm run db:seed
NOTE: Full text search may take sometime to index after your first request. TODO: add way to verify search index is available, for now use MongoDB Compass
Seed the filters database:
cd ../filters-server
npm run db:seed
Seed the users database:
cd ../users-server
npm run db:seed
You can then use swagger or curl
for requests:
curl http://localhost:3000/v0/items/\?sort\=-name
To stop all the containers:
cd /path/to/workplace-api
make down
To start them back up again with out rebuilding them:
cd /path/to/workplace-api
make up
After app servers start up swagger ui will automatically read from the client-gateway/api-docs.json. You should be able to access swagger here
TODO
Change into directory of single project:
cd /path/to/project
Build image:
make build
Tag image for registry:
docker tag workplacex/filters-server gcr.io/workplacex-179405/workplacex/filters-server:latest
Push tagged image to registry:
gcloud docker -- push gcr.io/workplacex-179405/workplacex/filters-server:latest
Auth to container cluster:
gcloud container clusters get-credentials workplacex-prototype --zone us-west1-a --project workplacex-179405
Connect to Kubrenetes GUI:
kubectl proxy
http://localhost:8001/ui
Change directory to single project:
cd /path/to/project
Create deployment:
kubectl create -f k8s/deployment.yml
Create service:
kubectl create -f k8s/service.yml
- GRPC
- Protobufs
- Mongoose
- MongoDB
- Express
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull/merge request to a maintainer :D
We will use SemVer for versioning. For the versions available, see the tags on this repository.
- Sean Graham - Initial work - sgraham785