Skip to content

Commit

Permalink
minor: Upgrade Getting Started experience for node
Browse files Browse the repository at this point in the history
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipul@balena.io>
  • Loading branch information
vipulgupta2048 committed Mar 1, 2022
1 parent 2d06f62 commit 8b4a3a1
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"version": "1.1.0",
"description": "A simple Expressjs Web server on balena",
"main": "server.js",
"private": true,
"scripts": {
"start": "node server.js"
"start": "node src/server.js"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion repo.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
type: generic
type: node
6 changes: 3 additions & 3 deletions server.js → src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ const favicon = require('serve-favicon')
const app = express()
const PORT = 80

app.use(favicon(join(__dirname, 'public', 'favicon.ico')))
app.set('views', join(__dirname, 'views'))
app.use(favicon(join(__dirname, '../views/public', 'favicon.ico')))
app.set('views', join(__dirname, '../views'))
app.set('view engine', 'ejs')

// Enable the public directory for resource files
app.use('/public', express.static(
join(__dirname, 'public')
join(__dirname, '../views/public')
))

// reply to request with the hello world html file
Expand Down
2 changes: 1 addition & 1 deletion views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
</nav>
</div>

<div class="container mt-5 mb-5 p-0 pb-5">

<div class="row d-flex flex-column align-items-center">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.

0 comments on commit 8b4a3a1

Please sign in to comment.