simondereuver / image-rec

2 stars 0 forks source link

Rework file and code structure #25

Open simondereuver opened 11 months ago

simondereuver commented 11 months ago

Rework file and code structure into something like this:

project-root/ ├── Server/ │ ├── server.js (Contains server setup, routes, etc.) │ ├── random-quotes.txt (Sample data file, used by the server) │ └── ... ├── Client/ │ ├── index.html (Main HTML file) │ ├── app.js (Client-side JavaScript entry point) │ ├── styles.css (CSS styles) │ └── ... ├── test/ │ └── test-file.js (Mocha test suite for the server-side) ├── index.js (Main entry point for the server-side) ├── package.json (Project configuration) └── ...

Main thing of this is to create the index.js file in project-root and breakout some code from server.js and move into the index.js file for better maintainability and to create unit-tests.

simondereuver commented 11 months ago

Created index.js file.

simondereuver commented 11 months ago

Reworked file structure and code of index.js in root-folder and server.js in server folder in commit: 8499a2093c465e3a25ff9b24cd411de99ddd7a56

simondereuver commented 10 months ago

Further improve file structure, add a routes directory inside the Server directory and move over functionality of the RandomQuotes API to a separate file that handles it.

simondereuver commented 10 months ago

Further improve file structure, add a routes directory inside the Server directory and move over functionality of the RandomQuotes API to a separate file that handles it.

Done in commit: e22ebdc