Roughing out the demo app
This commit is contained in:
11
node_modules/json-server/lib/server/router/get-full-url.js
generated
vendored
Normal file
11
node_modules/json-server/lib/server/router/get-full-url.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
const url = require('url');
|
||||
|
||||
module.exports = function getFullURL(req) {
|
||||
const root = url.format({
|
||||
protocol: req.protocol,
|
||||
host: req.get('host')
|
||||
});
|
||||
return `${root}${req.originalUrl}`;
|
||||
};
|
||||
Reference in New Issue
Block a user