Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major Update #9

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Major Update #9

wants to merge 22 commits into from

Conversation

ethanwillis
Copy link

This fixes issues #2, #5, #6, #8.

This includes a partial fix for #7. The docker-compose setup does not currently run the daemon. That will happen once issues #3 and issues #4 are resolved. Those are dependent on rewriting the daemon with cylon.js.

…ner is ready. Rename the event the mongodb connection emits to be more informative.
…ent variables for PORT, DATABASE connection strings, and NODE_ENV.

- Created docker compose file for dev in the root directory of the project that can startup the backend and a mongodb instance.
- Modified app.js to use our mongoose.js connection code.
- Updated project .gitignore so that it ignores a data directory that mongo creates to store all of our database data.
All endpoints are now defined in a routes file per object that is stored in the database.

get/set settings are defined as a single /settings resource with POST and GET endpoints.
  - POST /settings corresponds to the old /setSettings endpoint
  - GET /settings corresponds to the old /getSettings endpoint.

get monitors is now defined as a single /status resource with a GET endpoint.
  - GET /status corresponds to the old /getMonitors endpoint.
Fixed mistake in the Settings api POST endpoint
Added in loading of API endpoints for express app.
- Updated docker-compose-dev file to include frontend and linked it to backend.
- Updated GUI package.json proxy to proxy to the docker-compose backend service.
- Updated GUI app.js to use the new endpoints in the backend service for fetching data.
…an now pass in the location of the backend API via environment variables.

- Removed React proxy from package.json until react proxy can be configured through environment variables.
- Updated gui/src/App.js to use the environment variables for the api location when making requests.
…ow to start the service with docker or docker-compose, and how to configure the service with environment variables
- How to setup docker/docker-compose
- How to start the backend service as either a standalone container or as part of a docker-compose full system.
- How to configure the container with its environemnt variables.
- Structure of the REST API resources, endpoints, and examples of how to make requests.
  - Fixed typo for directory name.

Frontend Readme
  - Added information on how to start the frontend as either a standalone container with docker. Or as a full software system with docker-compose
@ethanwillis
Copy link
Author

This PR also includes documentation for all the changes made to the backend and gui services within their respective folders @ README.md

@ethanwillis
Copy link
Author

@ljyanesm If I refactor this to fix the new conflicts is there a chance of it being merged?

@homonecloco
Copy link
Member

Hi @ethanwillis ,
Thanks for work on this. I'm sorry we haven't replied earlier. I like how you are formalising the code. If you resolve the conflicts I'll test it and merge the changes.
Best,
Ricardo.

@ethanwillis
Copy link
Author

@homonecloco no worries :) I'll have some time this weekend to resolve the current conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants