Skip to content

Commit d1323d6

Browse files
minor: Upgrade Getting Started experience for node
Signed-off-by: Vipul Gupta (@vipulgupta2048) <[email protected]>
1 parent 2d06f62 commit d1323d6

File tree

8 files changed

+7
-6
lines changed

8 files changed

+7
-6
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"version": "1.1.0",
44
"description": "A simple Expressjs Web server on balena",
55
"main": "server.js",
6+
"private": true
67
"scripts": {
7-
"start": "node server.js"
8+
"start": "node src/server.js"
89
},
910
"repository": {
1011
"type": "git",

repo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
type: generic
1+
type: node

server.js renamed to src/server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ const { join } = require('path')
22
const express = require('express')
33
const favicon = require('serve-favicon')
44
const app = express()
5-
const PORT = 80
5+
const PORT = 8080
66

7-
app.use(favicon(join(__dirname, 'public', 'favicon.ico')))
8-
app.set('views', join(__dirname, 'views'))
7+
app.use(favicon(join(__dirname, '../views/public', 'favicon.ico')))
8+
app.set('views', join(__dirname, '../views'))
99
app.set('view engine', 'ejs')
1010

1111
// Enable the public directory for resource files
1212
app.use('/public', express.static(
13-
join(__dirname, 'public')
13+
join(__dirname, '../views/public')
1414
))
1515

1616
// reply to request with the hello world html file
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)