Expose all social posts in one place.
OTHER License
Exposer aims at being a webservice which aggregates all posts from various social networks in one place.
Currently, it supports collecting public Twitter and Facebook posts. You can see two instances deployed:
For production use Docker
_. See run.sh
for a script which runs Exposer and MongoDB
containers. By default (depending on the NAME
and DATA_ROOT
you set), you should provide a
/srv/exposer/configuration.sh
file which exports environment variables to configure the Exposer instance.
Besides various tokens you probably want to configure the following as well::
export HOST=0.0.0.0
export PORT=5000
export NODE_ENV=production
export REMOTE=
MONGODB_URL
is configured automatically from the linked Docker container. Set BEHIND_PROXY=1
if you are using
a reverse HTTP proxy before the container (you should
_).
.. _Docker: https://www.docker.io/ .. _you should: https://github.com/tozd/docker-nginx-proxy
Development installation which uses remote data. Useful when developing just client side.
You will need node.js
. On Mac OS X using Homebrew::
brew install node
Clone from the GitHub_ repository::
git clone https://github.com/mitar/exposer.git
You can also use SSH-based URL or URL of your fork.
Move to location where you cloned the repository and run::
npm install browserify client.js -p ./configure -o static/bundle.js
This will install all node.js dependencies and compile client JavaScript file.
You can ignore the Expressions in require() statements
warning.
If you want client JavaScript file to be compiled automatically on any change to source files (so that it is easy
to develop), run with -w
parameter::
browserify client.js -w -v -p ./configure -o static/bundle.js
Run::
node web.js
and open http://127.0.0.1:5000/.
Development installation which uses local database. Useful when developing server side, too.
Requirement is MongoDB_ and follow its installation so that it runs as service in the background.
On Mac OS X using Homebrew_::
brew install mongodb
Furthermore, you will need node.js
_::
brew install node
Clone from the GitHub_ repository::
git clone https://github.com/mitar/exposer.git
You can also use SSH-based URL or URL of your fork.
Move to location where you cloned the repository and run::
npm install browserify client.js -p ./configure -o static/bundle.js
This will install all node.js dependencies and compile client JavaScript file.
If you want client JavaScript file to be compiled automatically on any change to source files (so that it is easy
to develop), run with -w
parameter::
browserify client.js -w -v -p ./configure -o static/bundljs
You will need also various app keys for social networks (see settings.js
file for the list). You have to
put them into the process environment. If you are using Heroku_, you can put them into .env
file in the root of the repository
_. You can maybe ask some other developer to provide you with the .env
file.
Set process environment variable REMOTE
to the empty string. This is necessary for Exposer to use local database.
You can set MONGODB_URL
to point to the MongoDB database if you are not running it locally with default settings.
Using Heroku_ you can run (which will use .env
file to populate environment variables)::
foreman start -f Procfile-development
or (if you configure environment variables manually) simply::
node web.js
and open http://127.0.0.1:5000/.
.. _MongoDB: http://www.mongodb.org/ .. _Homebrew: http://mxcl.github.com/homebrew/ .. _node.js: http://nodejs.org/ .. _GitHub: https://github.com/ .. _Heroku: http://heroku.com/ .. _in the root of the repository: https://devcenter.heroku.com/articles/procfile#setting-local-environment-variables