Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22416533
index.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
775 B
Referenced Files
None
Subscribers
None
index.ts
View Options
import
kill
from
"kill-port"
;
import
_locreq
from
"locreq"
;
import
TheApp
from
"./app.js"
;
import
{
SEALIOUS_SANITY
}
from
"./config.js"
;
import
{
mainRouter
}
from
"./routes/index.js"
;
import
{
module_dirname
}
from
"./util.js"
;
const
locreq
=
_locreq
(
module_dirname
(
import
.
meta
.
url
));
const
app
=
new
TheApp
();
console
.
log
({
SEALIOUS_SANITY
});
kill
(
app
.
config
[
"www-server"
].
port
)
.
then
(()
=>
app
.
start
())
.
then
(
async
()
=>
{
if
(
SEALIOUS_SANITY
)
{
console
.
error
(
"Exiting with error code 0"
);
process
.
exit
(
0
);
}
mainRouter
(
app
.
HTTPServer
.
router
);
})
.
catch
((
error
)
=>
{
console
.
error
(
error
);
if
(
SEALIOUS_SANITY
)
{
console
.
error
(
"EXITING WITH STATUS 1"
);
process
.
exit
(
1
);
}
});
app
.
HTTPServer
.
addStaticRoute
(
"/"
,
locreq
.
resolve
(
"public"
));
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sat, Nov 28, 01:35 (23 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1229972
Default Alt Text
index.ts (775 B)
Attached To
Mode
rPHOTOAPP photo-app-demo
Attached
Detach File
Event Timeline