This is the codebase for the Grand Tour Explorer web project. To set up a local development environment, follow these steps:
curl https://cli-assets.heroku.com/install.sh | sh
)git clone https://github.com/cestastanford/grandtour
.npm install
.env
in the root directory.MONGODB_URI=mongodb://localhost:27017/grandtour
SECRET_KEY_1=abc
SECRET_KEY_2=abc
SECRET_KEY_3=abc
SHEETS_EMAIL=...
SHEETS_PRIVATE_KEY=...
BOOK_ORIGIN=...
npm run dev-start
. This will create and host a MongoDB database and start the Node server.dump
directory in the root directory of grandtour. Then run mongorestore -d grandtour dump/grandtour --port 27017 --host localhost --drop
in a separate terminal to sync the database to the local version.To restore a MongoDB database backup into your local database, unzip the backup and find the directory containing the BSON and JSON files. Make sure the development server is not running and run the following commands. Warning: this will erase the current database and replace it; make a copy of your data
directory if you want to save it.
npm run
).data
directory and create a new one: rm -rf data && mkdir data
mongod --dbpath data
mongorestore -d test path/to/directory/with/bson
npm run dev-start
.Map Visualization https://www.mapbox.com/install/js/bundler-install/
The GTE is deployed on Reclaim Hosting.
To deploy, first make a pull request or a commit to the master
branch. Then, a GitHub Action will build the appropriate code and push the results to the build
branch. Then, to deploy to Reclaim:
install MongoDB 4 on Ubuntu
nvm install 14
nvm use 14
npm i
npm i -g heroku
npm run dev-start
wget -qO - https://www.mongodb.org/static/pgp/server-4.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 trusted=yes ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org