2014-07-22 04:36:12 +00:00
|
|
|
#!/usr/bin/env node
|
2014-07-08 04:35:52 +00:00
|
|
|
|
2014-07-22 04:36:12 +00:00
|
|
|
var express = require('express');
|
|
|
|
var keywords = require('./db/keywords.json');
|
|
|
|
var data = require('./db/data.json');
|
2014-07-08 04:35:52 +00:00
|
|
|
|
2014-07-22 04:36:12 +00:00
|
|
|
function main() {
|
|
|
|
var app = express();
|
|
|
|
var router = express.Router();
|
|
|
|
|
|
|
|
router.use('/keywords', function(req, res, next) {
|
2014-07-26 06:02:42 +00:00
|
|
|
console.log('Requesting keywords');
|
2014-07-22 04:36:12 +00:00
|
|
|
res.json(keywords);
|
|
|
|
});
|
|
|
|
|
|
|
|
app.use('/hscd', router);
|
|
|
|
app.listen(3000);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (require.main === module) {
|
|
|
|
main();
|
|
|
|
}
|
2014-07-08 04:35:52 +00:00
|
|
|
|