'How to deploy Nestjs app on Digital Ocean?

I keep getting a Deploy Error:Health Checks. Everything works fine on my local with npm run start:dev. It's also not showing any obvious errors in the logs. Im also using a 5 dollar droplet. Im also using the builtin CICD from Digital Ocean(PaaS).

deploy logs

[2022-04-16 19:53:01] 
[2022-04-16 19:53:01] > [email protected] start:prod /workspace
[2022-04-16 19:53:01] > node dist/main
[2022-04-16 19:53:01] 
[2022-04-16 19:53:02] [Nest] 17  - 04/16/2022, 7:53:02 PM     LOG [NestFactory] Starting Nest application...
[2022-04-16 19:53:02] [Nest] 17  - 04/16/2022, 7:53:02 PM     LOG [InstanceLoader] HttpModule dependencies initialized +43ms
[2022-04-16 19:53:02] [Nest] 17  - 04/16/2022, 7:53:02 PM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms
[2022-04-16 19:53:02] [Nest] 17  - 04/16/2022, 7:53:02 PM     LOG [InstanceLoader] ConfigModule dependencies initialized +1ms
[2022-04-16 19:53:02] [Nest] 17  - 04/16/2022, 7:53:02 PM     LOG [InstanceLoader] YakkaBot dependencies initialized +0ms
[2022-04-16 19:53:03] [Nest] 17  - 04/16/2022, 7:53:03 PM     LOG [RoutesResolver] EthplorerController {/token-metrics}: +63ms
[2022-04-16 19:53:03] [Nest] 17  - 04/16/2022, 7:53:03 PM     LOG [RouterExplorer] Mapped {/token-metrics/topTokenHolders/:tokenId/:limit, GET} route +2ms
[2022-04-16 19:53:03] [Nest] 17  - 04/16/2022, 7:53:03 PM     LOG [NestApplication] Nest application successfully started +3ms
[]

build logs

[2022-04-16 19:51:24] Adding 2/2 app layer(s)
[2022-04-16 19:51:24] Adding layer 'launcher'
[2022-04-16 19:51:25] Adding layer 'config'
[2022-04-16 19:51:25] Adding label 'io.buildpacks.lifecycle.metadata'
[2022-04-16 19:51:25] Adding label 'io.buildpacks.build.metadata'
[2022-04-16 19:51:25] Adding label 'io.buildpacks.project.metadata'
[2022-04-16 19:52:06] *** Images (sha256:f46327d2fbb45599a64b071296ea4d9e477bf7b8202192643e79e98cbbe9aee1):
[2022-04-16 19:52:06]       <image-1>
[2022-04-16 19:52:07] Reusing cache layer 'heroku/nodejs-engine:nodejs'
[2022-04-16 19:52:07] Reusing cache layer 'heroku/nodejs-engine:toolbox'
[2022-04-16 19:52:30] Reusing cache layer 'digitalocean/node:node_modules'
[2022-04-16 19:52:32] => Uploaded the built image to the container registry
[2022-04-16 19:52:32] => Build complete
[]

Deployment Settings



Solution 1:[1]

I think you should check again port of the server on the main file, maybe it is not 3000! The port must same with port on server and port on digital ocean

Solution 2:[2]

I can't answer why this isn't working with REPLACE, however, if you use TRANSLATE the problem does not persist:

UPDATE dbo.Test SET MyText = TRANSLATE(MyText, '<>', NCHAR(706)+NCHAR(707));

db<>fiddle

Alternatively, if you COLLATE the column to a binary collation inside REPLACE, the replacement works too.

UPDATE dbo.Test SET MyText = REPLACE(MyText COLLATE Latin1_General_BIN, N'>', NCHAR(707));
UPDATE dbo.Test SET MyText = REPLACE(MyText COLLATE Latin1_General_BIN, N'<', NCHAR(706));

db<>fiddle

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nguyễn Minh Tuấn
Solution 2