Start DS on your local - Gapminder/dollar-street-framework GitHub Wiki

For run DS on your local machine

1. Please make sure you have imagemagick and graphicsmagick installed.

sudo apt-get install -y imagemagick graphicsmagick

2. Please make sure you have installed webpack for CMS

npm i [email protected] -g

3. Put the actual local.ds.json in credentials folder in the project root. File name consist of MODE_ENV-NODE_ENV.json

dollar-street/
  ...
  credentials/
    ...
    local.ds.json
    ...
  ...

4. [optional] Run MongoDB on your local machine according to your operating system:

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

AND

restore the database from the dump file:

mongorestore -db dollarstreet --drop --gzip --archive=./dollarstreet.tar.gz

5. [optional] Set MONGODB_URL in credentials/local.ds.json config

{
  ...
  "MONGODB_URL": "VALID_MONGO_URL",
  ...
}

6. Set NODE_ENV MODE_ENV environtment variables

7. To run ds-pages run next npm scriptes:

npm run build:client:local:ds
npm run build:server
npm run server
npm run build:server-puppeteer
npm run server-puppeteer

8. To run ds-cms run next npm scripts:

npm run build:client-cms
npm run server-cms