From e4337a8cbc1ea59508e9f8cf26e335c2289d1d18 Mon Sep 17 00:00:00 2001 From: nikbabchenko Date: Sun, 7 Jan 2018 13:33:42 +0200 Subject: [PATCH] adds cors for node.js --- server.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server.js b/server.js index 92624e9..d56d623 100644 --- a/server.js +++ b/server.js @@ -1,6 +1,10 @@ const express = require('express'); const app = express(); const path = require('path'); +const cors = require('cors'); + +// ading cors +app.use(cors()); // If an incoming request uses // a protocol other than HTTPS,