mirror of https://github.com/mdchap/pubapptest.git
add backend javascript project
This commit is contained in:
parent
8f8fcdc46b
commit
5b315f306a
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "pubapptest-backend-js",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "src/server.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mdchap/pubapptest.git"
|
||||
},
|
||||
"author": "Matt Chapman <m.d.chapman0202@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mdchap/pubapptest/issues"
|
||||
},
|
||||
"homepage": "https://github.com/mdchap/pubapptest#readme"
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import express from 'express';
|
||||
import bodyParser from 'body-parser';
|
||||
import cors from 'cors';
|
||||
|
||||
const app = express();
|
||||
app.use(cors());
|
||||
app.use(bodyParser.json());
|
||||
|
||||
app.get('/api', (req, res) => {
|
||||
res.json({ message: 'Hello from server!' });
|
||||
});
|
Loading…
Reference in New Issue