Skip to content

Commit 7f11a7a

Browse files
authored
fix(server-file): Switch to addHook (#11)
1 parent e538ac1 commit 7f11a7a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

api/src/server.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,17 @@ export async function serve(
111111

112112
// Start
113113
server.listen({ port: apiPort })
114-
server.ready(() => {
114+
server.addHook('onReady', (done) => {
115115
logger.info('Studio is up and running!')
116-
logger.info(
117-
`To access the Studio, visit ${chalk.green(
118-
`http://localhost:${webPort}`
119-
)}`
120-
)
116+
117+
const prettyUrl = chalk.green(`http://localhost:${webPort}`)
118+
logger.info(`To access the Studio, visit ${prettyUrl}`)
121119

122120
if (autoOpen) {
123121
open(`http://localhost:${webPort}`)
124122
}
123+
124+
done()
125125
})
126126

127127
// Cleanup (async will not be resolved!)

0 commit comments

Comments
 (0)