A detailed documentation of the API is available here.
A demo of our API can also be found here.
Data accessible through the API has been extracted from these sources:
localhost:8080
"scripts": {
"start" : "node app.js",
"listen": "node scripts/listen.js",
"build" : "node scripts/build.js",
"test" : "node test/main.js"
}
npm run build --collection=pokemon
// data-source-name - rarePokemon, pokeRadar, skiplagged, pokecrew, fastpokemap, pokezz, pokedexs, pokemap
npm run listen -collection=<data-source-name>
CONSUMER_KEY=<CONSUMER_KEY> CONSUMER_SECRET=<CONSUMER_SECRET> ACCESS_TOKEN=<ACCESS_TOKEN> ACCESS_TOKEN_SECRET=<ACCESS_TOKEN_SECRET> NODE_ENV=<NODE_ENV> npm run listen -collection=twitter
MLAB_USERNAME=<MLAB_USERNAME> MLAB_PASSWORD=<MLAB_PASSWORD> MLAB_URI=<MLAB_URI> MLAB_COLLECTION=<MLAB_COLLECTION> npm run build -collection=pokemon
// data-source-name - rarePokemon, pokeRadar, skiplagged, pokecrew, fastpokemap, pokezz, pokedexs, pokemap
MLAB_USERNAME=<MLAB_USERNAME> MLAB_PASSWORD=<MLAB_PASSWORD> MLAB_URI=<MLAB_URI> MLAB_COLLECTION=<MLAB_COLLECTION> npm run listen -collection=<data-source-name>
MLAB_USERNAME=<MLAB_USERNAME> MLAB_PASSWORD=<MLAB_PASSWORD> MLAB_URI=<MLAB_URI> MLAB_COLLECTION=<MLAB_COLLECTION> CONSUMER_KEY=<CONSUMER_KEY> CONSUMER_SECRET=<CONSUMER_SECRET> ACCESS_TOKEN=<ACCESS_TOKEN> ACCESS_TOKEN_SECRET=<ACCESS_TOKEN_SECRET> NODE_ENV=<NODE_ENV> npm run listen -collection=twitter
To build the project using Docker, follow these steps.
Execute the following commands in the terminal.
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
# Run the latest build from the develop branch
docker run --env-file <PATH_TO_ENV_FILE> -p 49160:8080 --name <CONTAINER_NAME>
-d pokemongoers/pokedata:develop npm start
# Check the status of the container
docker ps
The application can be accessed at the URL HOST_IP:49160
.
There is a configuration file config.js
in the root folder.
If you don't want to pass parameters for DB connection and twitter credentials everytime you can adapt it.
Just replace the process.env.*
with the desired value. The "database"
key is development mode, "shared_database"
for production mode and "twitter"
holds the twitter information.