diff options
author | Vitaly Takmazov | 2022-10-30 01:57:28 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:58 +0300 |
commit | c8648e66150a5a7e413e4c225aa850b281dc65a2 (patch) | |
tree | 30c32ee10300994d6d55c4bacb2900ff74b1a710 /vnext/server/index.js | |
parent | 657af5906ed50acc9bacea487ac22b6c9c961571 (diff) |
express: enable body parser
Diffstat (limited to 'vnext/server/index.js')
-rw-r--r-- | vnext/server/index.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vnext/server/index.js b/vnext/server/index.js index 729f05d6..c347739f 100644 --- a/vnext/server/index.js +++ b/vnext/server/index.js @@ -1,4 +1,6 @@ import express from 'express'; +import { raw } from 'body-parser'; +import cors from 'cors'; import config from 'config'; // we'll talk about this in a minute: @@ -12,6 +14,8 @@ const path = require('path'); // initialize the application and create the routes const app = express(); +app.use(raw()); +app.use(cors()); const router = express.Router(); router.post('/api/sender', event); |