Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ABSD
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hub
ABSD
Commits
82969b40
Commit
82969b40
authored
3 weeks ago
by
Simon Malesys
Browse files
Options
Downloads
Patches
Plain Diff
Mark server as ready sooner
parent
42c726de
No related branches found
No related tags found
No related merge requests found
Pipeline
#153276
passed with stages
in 8 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/server/app.js
+4
-2
4 additions, 2 deletions
src/server/app.js
with
4 additions
and
2 deletions
src/server/app.js
+
4
−
2
View file @
82969b40
...
@@ -169,6 +169,9 @@ fastify.listen({
...
@@ -169,6 +169,9 @@ fastify.listen({
host
:
envConfig
.
ABSD_SERVER_HOST
,
host
:
envConfig
.
ABSD_SERVER_HOST
,
port
:
envConfig
.
ABSD_SERVER_PORT
port
:
envConfig
.
ABSD_SERVER_PORT
}).
then
(
async
()
=>
{
}).
then
(
async
()
=>
{
fastify
.
serverIsReady
=
true
fastify
.
log
.
info
({
envConfig
})
if
(
envConfig
.
NODE_ENV
===
'
production
'
)
{
if
(
envConfig
.
NODE_ENV
===
'
production
'
)
{
fastify
.
databaseIsReady
=
false
fastify
.
databaseIsReady
=
false
return
await
buildDatabase
()
return
await
buildDatabase
()
...
@@ -177,8 +180,7 @@ fastify.listen({
...
@@ -177,8 +180,7 @@ fastify.listen({
if
(
dbResults
)
{
if
(
dbResults
)
{
fastify
.
log
.
info
(
`
${
envConfig
.
ABSD_DB_NAME
}
database created`
)
fastify
.
log
.
info
(
`
${
envConfig
.
ABSD_DB_NAME
}
database created`
)
}
}
fastify
.
log
.
info
({
envConfig
})
fastify
.
serverIsReady
=
true
fastify
.
databaseIsReady
=
true
fastify
.
databaseIsReady
=
true
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
fastify
.
log
.
error
(
err
)
fastify
.
log
.
error
(
err
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment