This is a simple application to help gain adoption of trailhead by allowing your team to see stats in the same manner as a gaming leaderboard.
This entire application can run for free on Heroku.
Click the Deploy to Heroku button
Configure the schedule: (this keeps the leaderboard up to date daily)
1:00 PM UTC
Pull Requests are Welcome!
It is good to follow Heroku's node.js tutorial to get an understanding of how node.js works on Heroku and to configure your local environment.
Grab a copy of the code and run it locally
You'll want to create your own .env file with the MongoDB URI in it:
MONGODB_URI=mongodb://<<username>>:<<password>>@<<your instance>>.mlab.com:<<port number>>/<<your instance>>
There is a
launch.json file part of the project to make it easy to debug with VSCode.
To view error logs:
heroku logs --tail -a <<appname>>
Kill Local Instance
To kill the local development environment:
Sometimes the local heroku development enviornment may die in the background, this stackoverflow tip was helpful:
Lists all processes on port 5000:
lsof -i :5000
Find the PID and then kill the process with this command:
sudo kill -9 <<pid>>
For best performance, ensure that the app is running in production mode (it should be already by default):
heroku config:set NODE_ENV=production -a <<your app aname>>
The puppeteer buildpack used to scrape trailhead profiles:
heroku buildpacks:set jontewks/puppeteer
heroku buildpacks:set heroku/nodejs