Nicky
Nicky
RRailway
Created by Nicky on 4/17/2024 in #✋|help
What is the best way to install private npm packages?
I was hoping there would be an easier solution but thanks 😅
7 replies
RRailway
Created by Nicky on 4/17/2024 in #✋|help
What is the best way to install private npm packages?
project ID: 8a8bfe2d-1094-4b5f-834a-eba6388d0180
7 replies
RRailway
Created by Nicky on 2/14/2024 in #✋|help
Redis connection closed on private network
Ok, that actually did it! Must've been something unrelated earlier. Thanks a lot!
17 replies
RRailway
Created by Nicky on 2/14/2024 in #✋|help
Redis connection closed on private network
Tried earlier and got an error but will try again as I was trying all sorts of things at the time
17 replies
RRailway
Created by Nicky on 2/14/2024 in #✋|help
Redis connection closed on private network
It looks like nestjs doesn't allow to set the family when defining the transport... I also have another service which is using redis through ioredis and setting the family allowed for using the private url which is great. Is there any other way to make this work without the family?
17 replies
RRailway
Created by Nicky on 2/14/2024 in #✋|help
Redis connection closed on private network
Yes, [email protected] judging by the logs. Will try 20sec for testing
17 replies
RRailway
Created by Nicky on 2/14/2024 in #✋|help
Redis connection closed on private network
I could try if that's a possible fix
17 replies
RRailway
Created by Nicky on 2/14/2024 in #✋|help
Redis connection closed on private network
No
17 replies
RRailway
Created by Nicky on 2/14/2024 in #✋|help
Redis connection closed on private network
I've tried to do it within my app but no luck
function sleep(ms: number) {
return new Promise((resolve) => {
setTimeout(resolve, ms)
})
}

async function bootstrap() {
await sleep(3000)

const app = await NestFactory.create(AppModule)

app.use(cookieParser())

const redisURL = new URL(process.env.PUB_SUB_URL)

await app.connectMicroservice<MicroserviceOptions>({
transport: Transport.REDIS,
options: {
port: parseInt(redisURL.port),
host: redisURL.hostname,
username: redisURL.username,
password: redisURL.password,
},
})
await app.startAllMicroservices()

const port = process.env.DATA_SERVICE_PORT
const host = process.env.DATA_SERVICE_HOST
await app.listen(port, host)

Logger.log(`🚀 Application is running on: http://${host}:${port}`)
}
function sleep(ms: number) {
return new Promise((resolve) => {
setTimeout(resolve, ms)
})
}

async function bootstrap() {
await sleep(3000)

const app = await NestFactory.create(AppModule)

app.use(cookieParser())

const redisURL = new URL(process.env.PUB_SUB_URL)

await app.connectMicroservice<MicroserviceOptions>({
transport: Transport.REDIS,
options: {
port: parseInt(redisURL.port),
host: redisURL.hostname,
username: redisURL.username,
password: redisURL.password,
},
})
await app.startAllMicroservices()

const port = process.env.DATA_SERVICE_PORT
const host = process.env.DATA_SERVICE_HOST
await app.listen(port, host)

Logger.log(`🚀 Application is running on: http://${host}:${port}`)
}
17 replies
RRailway
Created by Nicky on 7/5/2023 in #✋|help
Private network
It's just '::'. I'm using nodejs with fastify and it looks something like: await app.listen(port, '::') And you don't need to reference the port when using the internal address. It's like calling any other api, you do it by their domain. The port is relevant only when you run the service locally. Hope it helps!
15 replies
RRailway
Created by Nicky on 7/5/2023 in #✋|help
Private network
I just had to update service service B to listen on :: . And when I make calls from service A, I can reference it by the internal address
15 replies
RRailway
Created by Nicky on 7/5/2023 in #✋|help
Private network
Changing the host to :: when starting the app solved the problem. Thank you!
15 replies
RRailway
Created by Nicky on 7/5/2023 in #✋|help
Private network
8a8bfe2d-1094-4b5f-834a-eba6388d0180
15 replies