|
@@ -0,0 +1,27 @@
|
|
|
+
|
|
|
+const express = require('express')
|
|
|
+
|
|
|
+const app = express()
|
|
|
+
|
|
|
+const cors = require('cors')
|
|
|
+app.use(cors())
|
|
|
+
|
|
|
+const bodyParser = require('body-parser')
|
|
|
+const multiparty = require('connect-multiparty')
|
|
|
+
|
|
|
+app.use(bodyParser.urlencoded({
|
|
|
+ extended:true
|
|
|
+}));
|
|
|
+
|
|
|
+app.use(bodyParser.json())
|
|
|
+
|
|
|
+app.use(multiparty())
|
|
|
+
|
|
|
+app.get('/info', (req, res) => {
|
|
|
+ res.send("Hello shaoyahu !")
|
|
|
+})
|
|
|
+
|
|
|
+app.listen(3000, () => {
|
|
|
+ console.log('express server running at http://127.0.0.1:' + 3000);
|
|
|
+})
|
|
|
+
|