A new .env.dist file has been created to serve as an environment file template.
An SQL file containing table creation queries and test data population queries has been added.
The database run command has been included, along with a link to the database diagram.
Lastly, index.js has been replaced with app.js for better file organization.
Details
- Reviewers
dereckson - Maniphest Tasks
- T1900: Implement MVC architecture
T1838: Add service (feature)
T1842: Design DB schema
T1846: Set up the Express server with PostgreSQL connection
T1847: Set up PostgreSQL database - Commits
- rSP7ecfd3cfa5a9: Remove unwanted files
rSP2b0989489d62: Remove unwanted comments
rSP92b5588340e3: Correct markdown syntax
rSP9f1887646923: Add code conventions
rSP82443759b2fc: Update license to BSD-2
rSP6fc8014af426: Update main file header
rSP398a92cd7f95: Implement basic MVC architecture
rSP6d6a4c084148: Add DB run command & link to DB diagram
rSP051db3fca8b7: Add test data population queries
rSPfee8475026e2: Add SQL file for table creation
rSP41e9d42057c8: Implement basic MVC architecture
rSPb6bcb614b8ab: Create .env.dist to provide an env file template
Diff Detail
- Repository
- rSP ServPulse
- Lint
Lint Passed - Unit
No Test Coverage - Branch
- mvc-skeleton
- Build Status
Buildable 5012 Build 5293: arc lint + arc unit
Event Timeline
backend/servpulse-backend/app.js | ||
---|---|---|
1 | Not sure why each file start by it's name If you wish a proper header you can use this: /* ------------------------------------------------------------- ServPulse :: app - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Project: Nasqueron Description: Bootstrap the application License: BSD-2-Clause ------------------------------------------------------------- */ | |
2 | Document in the README something like Code conventionsThe project adheres to the following code conventions: In addition:
| |
backend/servpulse-backend/controllers/incidentController.js | ||
2 | Can we've a utility method requireModel so we we can write requireModel('incidentModel')? | |
16 | ? (see below) | |
backend/servpulse-backend/controllers/serviceController.js | ||
24 | ? Don't commit intents, document them somewhere on a task if really needed serviceController: methods to add after getServices (around line 24) | |
backend/servpulse-backend/models/serviceModel.js | ||
5 | Need to find a way to write those queries on several lines. Ideally: INSERT INTO service (name, "group", description, status) VALUES (\$1, \$2, \$3, \$4) RETURNING * | |
backend/servpulse-backend/package.json | ||
10 | You wanted MIT fist. But probably best to just pick BSD-2-Clause, it's virtually the same, | |
backend/servpulse-backend/routes/incidentRoutes.js | ||
8 | ? (see above) | |
backend/servpulse-backend/routes/serviceRoutes.js | ||
9 | ? (see above) | |
database/README.md | ||
1 | Markdown headings: | |
4 | ||
database/scripts/populate_data.sql | ||
1 | If there are part of integration tests, put them in tests/ If there are part of an example or an help for developers, put them in docs/ If not intended to be used for development, don't commit it (personally I'd put that somewhere like database/docs/sample_data.sql | |
11 | I prefer what you had on your laptop: you had real service names Also, you don't have any warranty first group will always be "1", so probably best to put back the id in service_group | |
database/servpulse.sql | ||
1 | This folder needs to be organized as migrations, so when the schema change, we can cope with it, as the schema is versioned:
| |
49 | Consider not to hide foreign keys by putting this in CREATE TABLE directly: "group" int REFERENCES "service_group" ("id") |
- Update main file header
- Add code conventions
- Update license to BSD-2
- Remove unwanted comments
- Correct markdown syntax
- Remove unwanted files
Thank you for your valuable insights. I believe I have addressed most of the issues you raised. Please let me know if there is anything else I can do before moving to the front-end. Thanks again for your help!
backend/servpulse-backend/controllers/incidentController.js | ||
---|---|---|
2 | We can have it as a ticket for now and see how it'll unfold in the future. Let me know what you think about it. | |
database/scripts/populate_data.sql | ||
1 | I don't know yet how it'll be organized and what will be useful for the next developer that'll maintain it. So, in order to avoid complexity I am deleting that file. | |
database/servpulse.sql | ||
1 | I am deleting that file too. |
We can have it as a ticket for now and see how it'll unfold in the future. Let me know what you think about it.
Sure.