Difference between revisions of "Setting up dev environment"
Jump to navigation
Jump to search
Susanna Ånäs (talk | contribs) |
Susanna Ånäs (talk | contribs) (→Set up local development environment) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Set up local development environment== | ==Set up local development environment== | ||
− | * | + | * '''Download''' Node.js and npm at https://nodejs.org/en/download/. You need at least Node version 7.6 because Wikidocumentaries uses Async, which in only supported since that version (https://www.infoq.com/news/2017/02/node-76-async-await). |
− | + | * '''Clone''' the repositories from GitHub to your local hard drive | |
− | * Clone the repositories | ||
** https://github.com/Wikidocumentaries/wikidocumentaries-ui | ** https://github.com/Wikidocumentaries/wikidocumentaries-ui | ||
** https://github.com/Wikidocumentaries/wikidocumentaries-api | ** https://github.com/Wikidocumentaries/wikidocumentaries-api | ||
− | * Edit wikidocumentaries-ui/src/store/store.js. Change the constant const BASE_URL to the local address by commenting out the server address: | + | * '''Edit''' wikidocumentaries-ui/src/store/store.js. Change the constant <code>const BASE_URL</code> to the local address by commenting out the server address: |
− | <pre> | + | <blockquote><pre> |
const BASE_URL = "http://localhost:3000/" | const BASE_URL = "http://localhost:3000/" | ||
//const BASE_URL = "https://wikidocumentaries-api.wmflabs.org/" | //const BASE_URL = "https://wikidocumentaries-api.wmflabs.org/" | ||
− | </pre> | + | </pre></blockquote> |
<span style="font-weight:bold;color:#FF3333">Note: Never upload this edit!</span> | <span style="font-weight:bold;color:#FF3333">Note: Never upload this edit!</span> | ||
− | * Go to each directory and run | + | * '''Set environment variables'''. There are three environment variables to define. You can ask for them in the developer Slack or mail susanna.anas@gmail.com. In a Mac (bash) you can define them like this: |
− | + | <blockquote><pre> | |
− | * | + | export WIKIDOCUMENTARIES_API_USER_AGENT=<email address> |
+ | export FLICKR_KEY=<flickr key> | ||
+ | export BING_MAPS_KEY=<maps key> | ||
+ | </pre></blockquote> | ||
+ | |||
+ | * '''Install''': Go to each directory and run <code>npm install</code> | ||
+ | * '''Run''': Go to each directory and run <code>npm run dev</code> | ||
==Wikimedia and project accounts== | ==Wikimedia and project accounts== |
Revision as of 13:48, 6 December 2019
Contents
Set up local development environment
- Download Node.js and npm at https://nodejs.org/en/download/. You need at least Node version 7.6 because Wikidocumentaries uses Async, which in only supported since that version (https://www.infoq.com/news/2017/02/node-76-async-await).
- Clone the repositories from GitHub to your local hard drive
- Edit wikidocumentaries-ui/src/store/store.js. Change the constant
const BASE_URL
to the local address by commenting out the server address:
const BASE_URL = "http://localhost:3000/" //const BASE_URL = "https://wikidocumentaries-api.wmflabs.org/"
Note: Never upload this edit!
- Set environment variables. There are three environment variables to define. You can ask for them in the developer Slack or mail susanna.anas@gmail.com. In a Mac (bash) you can define them like this:
export WIKIDOCUMENTARIES_API_USER_AGENT=<email address> export FLICKR_KEY=<flickr key> export BING_MAPS_KEY=<maps key>
- Install: Go to each directory and run
npm install
- Run: Go to each directory and run
npm run dev
Wikimedia and project accounts
- Get a Wikimedia account (the same account for all Wikipedias, Wikimedia Commons, Wikidata etc.) e.g. https://www.wikidata.org/wiki/Special:UserLogin
- Get the Wikimedia developer account > Registration instructions under "VPS and General Users". The same key and password let you access The Wikimedia Cloud Services at https://wikitech.wikimedia.org and the git repositories located at https://gerrit.wikimedia.org/. You are also creating a separate Shell account. Read also:
- Create an account in Wikimedia Phabricator
- Ask to join the codebase in GitHub
- Ask for an account to edit this wiki
Communication channels for developers
- Wikidocumentaries Github repository
- Wikidocumentaries Phabricator project
- Wikidocumentaries Slack channel Developers in channel #technology.
About | Technology | Design | Content modules | Tool pages | Projects |
Status
Wikidocumentaries Slack |
Setting up dev environment |
Components |
Active modules Module ideas |
Visual editor | Central Park Archives |