FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
astro-home-control/server/server.js at main · MicroWebStacks/astro-home-control · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
MicroWebStacks
/
astro-home-control
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
1
Star
9
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
astro-home-control
/
server
/
server.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
18 lines (13 loc) · 503 Bytes
Breadcrumbs
astro-home-control
/
server
/
server.js
Copy path
File metadata and controls
executable file
·
18 lines (13 loc) · 503 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import
express
from
'express'
;
import
{
handler
as
ssrHandler
}
from
'../dist/server/entry.mjs'
;
import
{
logger
}
from
'../src/libs/logger.js'
;
import
*
as
dotenv
from
'dotenv'
dotenv
.
config
(
)
const
app
=
express
(
)
;
app
.
use
(
express
.
static
(
'dist/client/'
)
)
app
.
use
(
ssrHandler
)
;
app
.
use
(
(
req
,
res
,
next
)
=>
{
res
.
status
(
404
)
.
send
(
"Sorry can't find that!"
)
}
)
logger
.
info
(
`server> listening on http://
${
process
.
env
.
SERVER_HOST
}
:
${
process
.
env
.
SERVER_PORT
}
`
)
app
.
listen
(
process
.
env
.
SERVER_PORT
)
;
Back
|
FazBrowse Home
|
New Git URL