providers utility endpoint
This commit is contained in:
parent
73025e6d57
commit
90ffab09bd
6
app.js
6
app.js
@ -22,15 +22,15 @@ app.use(express.bodyParser());
|
|||||||
|
|
||||||
// App
|
// App
|
||||||
|
|
||||||
/* Homepage */
|
|
||||||
app.get('/', function(req, res) {
|
app.get('/', function(req, res) {
|
||||||
fs.readFile(__dirname + '/views/index.html', 'utf8', function(err, text){
|
fs.readFile(__dirname + '/views/index.html', 'utf8', function(err, text){
|
||||||
res.send(text);
|
res.send(text);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/providers/us', function(req, res) {
|
app.get('/providers/:region', function(req, res) {
|
||||||
res.send(providers.us);
|
// Utility function, just to check the providers currently loaded
|
||||||
|
res.send(providers[req.params.region]);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.post('/text', function(req, res) {
|
app.post('/text', function(req, res) {
|
||||||
|
Loading…
Reference in New Issue
Block a user