Table of contents
DataHub frontend in Node.js.
Clone the repo, install dependencies using yarn (or npm), and run the server:
# or npm install yarn install npm start
.env file for loading environment variables. Please use the provided
env.template as a template:
SITE_URL- FQ base URL of the site, e.g.
API_URL- FQ base URL of the API endpoint, e.g.
BITSTORE_URL- base URL for the bitstore (pkgstore) e.g.
When running locally, use test api address in
See the docs for more information.
git submodule init && git submodule update
To build the CSS:
sass --watch public/sass:public/stylesheets
Now run the server:
export API_URL=https://api.datahub.io export BITSTORE_URL=https://pkgstore.datahub.io export dev=true npm start
To run in watch mode:
# Note the -e which means we watch for changes in templates too nodemon -e "js html" index.js
To run tests (make sure all environment variables are set):
We use Google Tag Manager to manage all tags (eg, google analytics, optimize and more) so instead of adding a new script into templates, you should consider editing via UI of Tag Manager.
- When pushing any commit to the
masterbranch, it triggers a build on the Deploy repo which then creates a pull request there.
- The changes in frontend are auto deployed to the staging site of DataHub, located at https://testing.datahub.io.
- Once the staging site looks as expected, deployment to production happens by merging the automatically created pull request from step 1.
- That's it! Just wait for about 5 minutes and you should be able to see the changes reflected on DataHub.io.