Skip to content
Snippets Groups Projects
Commit 160637a9 authored by Andrey Azov's avatar Andrey Azov
Browse files

Add host to image url

parent 5bdc68d5
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,13 @@ const attacher = () => {
};
const imageVisitor = (node) => {
// console.log('node:', JSON.stringify(node, null, 2));
let host;
if (process.env.DEPLOYMENT === 'NOW') {
host = 'https://zeit-serverless-exercise.now.sh';
} else {
host = 'http://localhost:3000';
}
node.url = `${host}${node.url}`;
};
module.exports = attacher;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment