Skip to content

Commit

Permalink
Set up node.js project
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasschroetler committed May 25, 2019
1 parent a33d69a commit 1217b0e
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
19 changes: 19 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const express = require("express");
const cors = require('cors');
const bodyParser = require("body-parser");
const port = 1337;

var app = express();

app.use(cors());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());

app.listen(port, function () {
console.log('API listening on Port ' + port);
})

app.get('/', function (req, res) {
res.send("API-Schnittstelle");
res.status(200).end();
});
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "aptr-api",
"version": "1.0.0",
"description": "A service to supply data about accessibility to routing",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Jugendhackt/APTR-Elescore-IFOPTifier.git"
},
"author": "",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/Jugendhackt/APTR-Elescore-IFOPTifier/issues"
},
"homepage": "https://github.com/Jugendhackt/APTR-Elescore-IFOPTifier#readme"
}

0 comments on commit 1217b0e

Please sign in to comment.