@igea/oac_frontend 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -3
- package/src/index.js +5 -0
- package/src/public/css/style.css +7 -0
- package/src/public/css/style.css.map +1 -0
- package/src/scss/_functions.scss +3 -0
- package/src/scss/_mixins.scss +3 -0
- package/src/scss/_typography.scss +8 -0
- package/src/scss/_variables.scss +4 -0
- package/src/scss/main.scss +4 -0
- package/src/views/base.twig +1 -0
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igea/oac_frontend",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Frontend service for the OAC project",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "cross-env NODE_ENV=production node src/index.js",
|
|
8
|
-
"dev": "cross-env NODE_ENV=development nodemon src/index.js"
|
|
8
|
+
"dev": "cross-env NODE_ENV=development nodemon src/index.js",
|
|
9
|
+
"build:scss": "sass src/scss/main.scss src/public/css/style.css",
|
|
10
|
+
"watch:scss": "sass --watch src/scss/main.scss:src/public/css/style.css"
|
|
9
11
|
},
|
|
10
12
|
"repository": {
|
|
11
13
|
"type": "git",
|
|
@@ -25,6 +27,7 @@
|
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
29
|
"cross-env": "7.0.3",
|
|
28
|
-
"nodemon": "3.1.10"
|
|
30
|
+
"nodemon": "3.1.10",
|
|
31
|
+
"sass": "1.89.2"
|
|
29
32
|
}
|
|
30
33
|
}
|
package/src/index.js
CHANGED
|
@@ -6,7 +6,10 @@ const path = require("path");
|
|
|
6
6
|
const serviceName = "frontend"
|
|
7
7
|
|
|
8
8
|
const app = express();
|
|
9
|
+
|
|
10
|
+
app.use(express.static(path.join(__dirname, 'public')));
|
|
9
11
|
app.use(express.json());
|
|
12
|
+
|
|
10
13
|
app.set('view engine', 'twig');
|
|
11
14
|
app.set('views', path.join(__dirname, 'views'));
|
|
12
15
|
|
|
@@ -14,6 +17,7 @@ getPort.default({
|
|
|
14
17
|
port: getPort.portNumbers(config.port_range.min, config.port_range.max) }
|
|
15
18
|
).then((newPort)=>{
|
|
16
19
|
|
|
20
|
+
// Defining routers
|
|
17
21
|
const healthRouter = require('./controllers/health.js');
|
|
18
22
|
app.use('/health', healthRouter);
|
|
19
23
|
|
|
@@ -22,6 +26,7 @@ getPort.default({
|
|
|
22
26
|
res.render('base', { title: 'Home Page', message: 'Hello from Twig!' });
|
|
23
27
|
});
|
|
24
28
|
|
|
29
|
+
// Start listing on the specified port
|
|
25
30
|
app.listen(newPort, async () => {
|
|
26
31
|
console.log(`${serviceName} listening on port ${newPort}`);
|
|
27
32
|
try {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../scss/_typography.scss","../../scss/_variables.scss"],"names":[],"mappings":"AAGA;EACI,aCFS;EDGT;EACA,OCNY","file":"style.css"}
|