|
|
@@ -3,6 +3,27 @@
|
|
|
*/
|
|
|
const fs = require('fs');
|
|
|
|
|
|
+module.exports.describeSelf = function (req, res) {
|
|
|
+ const description = {
|
|
|
+ description: 'Rural attractiveness web service',
|
|
|
+ methods: {
|
|
|
+ GET: [
|
|
|
+ '/refresh',
|
|
|
+ '/:aoi?/datasets/',
|
|
|
+ '/:aoi?/scores/:nuts',
|
|
|
+ '/:aoi?/scores',
|
|
|
+ '/:aoi?/runR/',
|
|
|
+ '/georeport/:nuts'
|
|
|
+ ],
|
|
|
+ POST: [
|
|
|
+ '/:aoi?/scores',
|
|
|
+ '/:aoi?/clusters/'
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.formatResponse(description, req, res)
|
|
|
+}
|
|
|
+
|
|
|
module.exports.formatResponse = function (obj, req, res) {
|
|
|
res.header("Content-Type", 'application/json');
|
|
|
|