Getting Started - cse110-sp24-group23/dev-journal GitHub Wiki
Getting Started
A live working demo exists at our GitHub Pages, but in case you wish to run anything locally, here is what is required.
Getting Code
To run Noted locally, first clone the repo by running
git clone https://github.com/cse110-sp24-group23/dev-journal.git
The dev journal does have an outside dependency for the markdown editor called SimpleMDE.
All source code is located in the ./src
folder, and all tests can be found in ./test
. src
has all the code for each page (calendar, settings, daily log, accomplishments, notes, and password) and the navbar that connects them all. Each page has its own folder within src
and has a javascript, css, and html file. The test
folder is broken down into it's individual testing components.
Running Locally
To open a local server and run the web app, we can use the Live Server
extension in VSCode, or any similar local server runner.
We can then point Live Server
to run on src/index.html
, which will open a server at
127.0.0.1:PORT
, where the port will be specified. This will bring you to a locally hosted version of the application.
If your local server specifically only launches at the root directory, adding the /src/index.html
to the url should bring you to the application home page.
Generating Documentation
To generate the JSDocs code documentation, we first need to install JSDocs:
npm install --save-dev jsdoc
Once this is installed, we can generate the documentation via:
./node_modules/.bin/jsdoc src -r
Which will generate all the documentation files in src
and puts them in a folder ./out
.
You can then access this via any html server (in similar fashion to above).
Running Tests
To run unit and integration tests locally, we can simply use
npm run unittest
npm run integrationtest
which will fire off both for the unit and integration tests respectively.
For end-to-end testing, you will first need to have a locally hosted version of the application running.
Then in each e2e test file in test/end-to-end
, replace any line of the form
let url = "http://127.0.0.1:5501/REST_OF_PATH";
with
let url = "$LOCAL_HOSTED_SERVER_IP/REST_OF_PATH";
and we can proceed to run
npm run e2etest