Skip to content

Commit e27ccc9

Browse files
Merge pull request #131 from oSoc18/develop
Deploy V0.0.8
2 parents e663bf6 + 5ae5b03 commit e27ccc9

File tree

14 files changed

+503
-335
lines changed

14 files changed

+503
-335
lines changed

files/9940/catalog.json

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1 @@
1-
{
2-
"@context": {
3-
"dcat": "https://www.w3.org/ns/dcat#",
4-
"dcterms": "http://purl.org/dc/terms/",
5-
"foaf": "http://xmlns.com/foaf/0.1/"
6-
},
7-
"@type": "dcat:Catalog",
8-
"dcterms:license": [{
9-
"@id": "https://creativecommons.org/publicdomain/zero/1.0/"
10-
}],
11-
"dcat:dataset": [{
12-
"@type": "dcat:Dataset",
13-
"dcat:keyword": "http://schema.org/Service",
14-
"dcat:distribution": [{
15-
"@type": "dcat:Distribution",
16-
"dcat:accessUrl": "http://smartflanders.ilabt.imec.be/graph/service-example.json",
17-
"dcat:mediaType": "text/html"
18-
}]
19-
},
20-
{
21-
"@type": "dcat:Dataset",
22-
"dcat:keyword": "http://purl.org/vocab/cpsv#PublicService",
23-
"dcat:distribution": [{
24-
"@type": "dcat:Distribution",
25-
"dcat:accessUrl": "http://smartflanders.ilabt.imec.be/graph/service-example.json",
26-
"dcat:mediaType": "text/html"
27-
}]
28-
},
29-
{
30-
"@type": "dcat:Dataset",
31-
"dcat:keyword": "http://data.vlaanderen.be/ns/gebouw#Gebouw",
32-
"dcat:distribution": [{
33-
"@type": "dcat:Distribution",
34-
"dcat:accessUrl": "http://smartflanders.ilabt.imec.be/graph/9940/12568861.json",
35-
"dcat:mediaType": "text/html"
36-
}]
37-
}
38-
]
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"}]},{"@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"}]}]}

index.js

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
1-
const express = require('express');
1+
const express = require("express");
22
const app = express();
3-
const body = require('body-parser');
4-
const morgan = require('morgan');
5-
const cors = require('cors');
6-
const routes = require('./routes');
7-
const path = require('path');
8-
const pug = require('pug');
3+
const body = require("body-parser");
4+
const morgan = require("morgan");
5+
const cors = require("cors");
6+
const routes = require("./routes");
7+
const path = require("path");
8+
const pug = require("pug");
99

1010
// --- Middlewere
1111
app.use(body.urlencoded({ extended: false }));
12-
app.use(morgan('dev'));
12+
app.use(morgan("dev"));
1313
app.use(cors())
1414

15-
app.use(express.static('public'));
16-
app.use('/graph', express.static('files'));
17-
app.get('/', (req, res) => {
18-
res.render('index');
15+
app.use(express.static("public"));
16+
app.get("/graph", (req, res) => {
17+
res.sendFile(__dirname + "/files/master-catalog.json");
18+
})
19+
app.use("/graph", express.static('files'));
20+
app.get("/", (req, res) => {
21+
res.render("index");
1922
})
2023
// --- Routes
21-
app.use('/', routes)
24+
app.use("/", routes)
2225

2326
// --- Enable PUG template
24-
app.set('views', path.join(__dirname, 'templates'));
25-
app.set('view engine', 'pug');
27+
app.set("views", path.join(__dirname, 'templates'));
28+
app.set("view engine", 'pug');
2629

2730
//
2831
app.use(function(err, req, res, next) {
2932
if(!err.message) err.message = "General error"
30-
res.status(500).send({status:500, message: err.message, type:'internal'});
33+
res.status(500).send({status:500, message: err.message, type:"internal"});
3134
})
3235

3336
/**
3437
* Server listener
3538
* @param {number} - Port number
3639
*/
37-
app.listen(3000, () => console.log('SmartFlanders is running on port 3000'))
40+
app.listen(3000, () => console.log("SmartFlanders is running on port 3000"))

0 commit comments

Comments
 (0)