Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F7511298
index.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
795 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
{
PORT
,
SEALIOUS_SANITY
}
from
"./config.js"
;
import
{
mainRouter
}
from
"./routes/index.js"
;
import
{
module_dirname
}
from
"./utils/module_dirname.js"
;
const
locreq
=
_locreq
(
module_dirname
(
import
.
meta
.
url
));
export
const
the_app
=
new
TheApp
();
void
(
async
function
()
{
await
kill
(
PORT
);
await
kill
(
PORT
);
try
{
the_app
.
HTTPServer
.
addStaticRoute
(
"/"
,
locreq
.
resolve
(
"public"
));
await
the_app
.
start
();
if
(
SEALIOUS_SANITY
)
{
console
.
error
(
"Exiting with error code 0"
);
process
.
exit
(
0
);
}
mainRouter
(
the_app
.
HTTPServer
.
router
);
}
catch
(
error
)
{
console
.
error
(
error
);
if
(
SEALIOUS_SANITY
)
{
console
.
error
(
"EXITING WITH STATUS 1"
);
process
.
exit
(
1
);
}
}
})();
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Mon, Jul 21, 00:19 (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
717175
Default Alt Text
index.ts (795 B)
Attached To
Mode
rREWRITE Configurable rewriter
Attached
Detach File
Event Timeline
Log In to Comment