-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from oSoc18/develop
Deploy V0.0.8
- Loading branch information
Showing
14 changed files
with
503 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1 @@ | ||
{ | ||
"@context": { | ||
"dcat": "https://www.w3.org/ns/dcat#", | ||
"dcterms": "http://purl.org/dc/terms/", | ||
"foaf": "http://xmlns.com/foaf/0.1/" | ||
}, | ||
"@type": "dcat:Catalog", | ||
"dcterms:license": [{ | ||
"@id": "https://creativecommons.org/publicdomain/zero/1.0/" | ||
}], | ||
"dcat:dataset": [{ | ||
"@type": "dcat:Dataset", | ||
"dcat:keyword": "http://schema.org/Service", | ||
"dcat:distribution": [{ | ||
"@type": "dcat:Distribution", | ||
"dcat:accessUrl": "http://smartflanders.ilabt.imec.be/graph/service-example.json", | ||
"dcat:mediaType": "text/html" | ||
}] | ||
}, | ||
{ | ||
"@type": "dcat:Dataset", | ||
"dcat:keyword": "http://purl.org/vocab/cpsv#PublicService", | ||
"dcat:distribution": [{ | ||
"@type": "dcat:Distribution", | ||
"dcat:accessUrl": "http://smartflanders.ilabt.imec.be/graph/service-example.json", | ||
"dcat:mediaType": "text/html" | ||
}] | ||
}, | ||
{ | ||
"@type": "dcat:Dataset", | ||
"dcat:keyword": "http://data.vlaanderen.be/ns/gebouw#Gebouw", | ||
"dcat:distribution": [{ | ||
"@type": "dcat:Distribution", | ||
"dcat:accessUrl": "http://smartflanders.ilabt.imec.be/graph/9940/12568861.json", | ||
"dcat:mediaType": "text/html" | ||
}] | ||
} | ||
] | ||
} | ||
{"@context":{"dcat":"https://www.w3.org/ns/dcat#","dcterms":"http://purl.org/dc/terms/","foaf":"http://xmlns.com/foaf/0.1/"},"@type":"dcat:Catalog","dcterms:license":[{"@id":"https://creativecommons.org/publicdomain/zero/1.0/"}],"dcat:dataset":[{"@type":"dcat:Dataset","dcat:keyword":"http://schema.org/Service","dcat:distribution":[{"@type":"dcat:Distribution","dcat:accessUrl":"http://smartflanders.ilabt.imec.be/graph/service-example.json","dcat:mediaType":"text/html"}]},{"@type":"dcat:Dataset","dcat:keyword":"http://purl.org/vocab/cpsv#PublicService","dcat:distribution":[{"@type":"dcat:Distribution","dcat:accessUrl":"http://smartflanders.ilabt.imec.be/graph/service-example.json","dcat:mediaType":"text/html"}]},{"@type":"dcat:Dataset","dcat:keyword":"http://data.vlaanderen.be/ns/gebouw#Gebouw","dcat:distribution":[{"@type":"dcat:Distribution","dcat:accessUrl":"http://smartflanders.ilabt.imec.be/graph/9940/12568861.json","dcat:mediaType":"text/html"}]},{"@type":"dcat:Dataset","dcat:keyword":"http://data.vlaanderen.be/ns/gebouw#Gebouw","dcat:distribution":[{"@type":"dcat:Distribution","dcat:accessUrl":"http://smartflanders.ilabt.imec.be/graph/12568861.json","dcat:mediaType":"text/html"}]}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
const express = require('express'); | ||
const express = require("express"); | ||
const app = express(); | ||
const body = require('body-parser'); | ||
const morgan = require('morgan'); | ||
const cors = require('cors'); | ||
const routes = require('./routes'); | ||
const path = require('path'); | ||
const pug = require('pug'); | ||
const body = require("body-parser"); | ||
const morgan = require("morgan"); | ||
const cors = require("cors"); | ||
const routes = require("./routes"); | ||
const path = require("path"); | ||
const pug = require("pug"); | ||
|
||
// --- Middlewere | ||
app.use(body.urlencoded({ extended: false })); | ||
app.use(morgan('dev')); | ||
app.use(morgan("dev")); | ||
app.use(cors()) | ||
|
||
app.use(express.static('public')); | ||
app.use('/graph', express.static('files')); | ||
app.get('/', (req, res) => { | ||
res.render('index'); | ||
app.use(express.static("public")); | ||
app.get("/graph", (req, res) => { | ||
res.sendFile(__dirname + "/files/master-catalog.json"); | ||
}) | ||
app.use("/graph", express.static('files')); | ||
app.get("/", (req, res) => { | ||
res.render("index"); | ||
}) | ||
// --- Routes | ||
app.use('/', routes) | ||
app.use("/", routes) | ||
|
||
// --- Enable PUG template | ||
app.set('views', path.join(__dirname, 'templates')); | ||
app.set('view engine', 'pug'); | ||
app.set("views", path.join(__dirname, 'templates')); | ||
app.set("view engine", 'pug'); | ||
|
||
// | ||
app.use(function(err, req, res, next) { | ||
if(!err.message) err.message = "General error" | ||
res.status(500).send({status:500, message: err.message, type:'internal'}); | ||
res.status(500).send({status:500, message: err.message, type:"internal"}); | ||
}) | ||
|
||
/** | ||
* Server listener | ||
* @param {number} - Port number | ||
*/ | ||
app.listen(3000, () => console.log('SmartFlanders is running on port 3000')) | ||
app.listen(3000, () => console.log("SmartFlanders is running on port 3000")) |
Oops, something went wrong.