EulerMarks, a Project Euler Benchmarking site#
- Install nvm
- Install latest version of node (check on nodejs.org)
- Install and run Mongodb on standard port
- Install node modules in base directory via
npm install - Create a new app on github and point url:
http://localhost:4000/, callbackurl:http://localhost:4000/api/auth/github(assuming you're using the default port 4000) - Copy config file
config/default.js.sampletoconfig/default.jsand fill in the appropriate fields - Manually change
web/js/router.jsurlFragment for github client_id. Yes. Very hacky. Need to fix this.
make run-app-devto run the web app server locally with default port of 4000 (hostname of localhost:4000). Additionally, you can get pretty output viamake -s run-dev | util/pretty.jsmake run-benchmarker-devto run the benchmarker server locally with default port of 5000 (hostname of localhost:5000). Additionally, you can get pretty output viamake -s run-dev | util/pretty.jsmake buildto run require.js optimizermake run-app-prodto run the server locally usingmake buildoutputmake testto run unit testsmake lintto run js linter
The framework is built in layers. Layers can be asynchronous.
- PreRoutes -- code for segments of the site based on route (think admin) (app/preRoutes)
- Routes -- routes for a single resource only to transform parameters (app/routes/)
- calls middleware for parameter checks (app/middleware)
- Handlers -- handles insertion into history (app/handlers/)
- returns data when read operations
- writes minimal amount of data to log what happened in history for write operations (history/history)
- Historian -- business logic of what tables to populate based on what has happened (historian/)
- async
- right now called right after a history element is inserted, but can be decoupled more
For collaborators, I prefer rebase workflow as opposed to merge workflow. I believe all pull requests are merge workflow so I don't know what to do about that yet. At this point I think all potential contributers are collaborators on the project.