-
Notifications
You must be signed in to change notification settings - Fork 9
Structure
Ksawery Chodyniecki edited this page Oct 3, 2021
·
4 revisions
Main file of the application, reads config, connects to database, starts session and hosts the app. Handles index and 404 pages.
Handles all routing to specific pages (currently divided between notes and users).
Describes the structure of tables present in our mongoDB (currently representing note and user records), and exposes them for further use in application.
Contains handler functions for the routes directory - here data from the database is restructured, formatted and rendered.
- note_get - gets all notes of a user and lists them
- note_details - renders edit view of a note
- note_create_get - renders note creation form
- note_create_post - assigns note to user and saves it to the DB
- note_delete - (does not work) deletes a note
- note_update - (does not work) updates a note
- user_register_get - renders registration form
- user_register_post - validates user and saves to database
- user_login_get - renders login form
- user_register_post - validates credentials and starts session for user
- user_logout_get - logs user out
Stores session data in separate files for each session, in json format.
Contains templates of HTML pages, which will be presented to the user when rendered.
All static resources are stored here, among which are vector images and CSS files.