tldr.io's API and website
JavaScript HTML Other
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cronjobs
db_analysis
grunt-tasks/tasks
lib
migrations
models
robots
routes
rss
templates
test
tools
.gitignore
Makefile
README.md
api.js
app.js
dump.rdb
grunt.js
package.json
website.js

README.md

  • $ node server.js to run the server
  • $ make test to run tests

Dependencies

We now use npm shrinkwrap. So no dependency is checked in to the repository (all of node_modules is in the .gitignore), and the package dependencies are locked in the file npm-shrinkwrap.json. When adding a dependency, follow these steps:

  • Add the dependency to your package.json
  • Run npm install to install this new dependency
  • Delete the file npm-shrinkwrap.json
  • Run the npm shrinkwrap command to recreate npm-shrinkwrap.json

If you are upgrading a dependency, follow the same steps but first delete the directory it is in.

Dev Mode

  • Use node-supervisor to live reload the server at each change (supervisor server);
  • Run grunt lint to lint the code and grunt watch to live execute lint task
  • Set your TLDR_PAGE_TEMPLATES environment variable to your [TLDR_CLIENTS]/dist/page/local/templates

Test Coverage

We use jscoverage to run a test coverage of our code. Check install of jscoverage for Node here. make test-cov to run the test coverage (takes about 1 min).