METACRAN
This is the Express application for the main METACRAN website at http://www.r-pkg.org
Contributions
Yes, please! METACRAN is developed completely in the open. All code and files are on GitHub at https://github.com/metacran.
Bug reports, code, design, ideas, any and all feedback are welcome.
Run it locally
-
Install node.js. io.js might work, too, although it is currently not tested.
-
Clone the repo, install needed npm packages:
git clone https://github.com/metacran/metacranweb cd metacranweb npm install
-
Start a local redis instance, for example with Docker:
docker run --name metacran-redis -p 6379:6379 redis redis-server
Alternatively you can configure an exising redis server with the environment variables
REDIS_HOST
(default:'127.0.0.1'
) andREDIS_PORT
(default:6379
) -
Start the app:
PORT=3000 bin/www
-
Go to
http://localhost:3000
in your browser.
Tips:
- Use supervisor or a similar program to watch for changes.
- Set the
GH_TOKEN
environment variable to your personal GitHub access token to avoid the GitHub API rate limits. - Set the
NODE_ENV
environment variable todevelopment
to get stacktraces in error messages. - Set the
DEBUG
environment variable toweb
to get server-side debug messages.
Bits and pieces
Technology used in the app itself:
- express.js
- ejs templates
- request for running queries
- elasticsearch client to connect to the package search service
Plus several smaller packages, see package.json.
We connect to various database backends, via HTTP(S):
- crandb A CouchDB database of CRAN package metadata.
- cranlogs CRAN download data from the RStudio mirror. A PostgreSQL database with a HTTP API.
- seer An elasticsearch database of CRAN package metadata.
- docs A CouchDB database of various CRAN package documentation: READMEs, NEWS files, CRAN Task Views, etc. This does not have a public API.
License
MIT © 2015 Gabor Csardi and contributors