imIgnacio
Network Egress - MongoDB Atlas
Hi there! I have a MERN app and I have set up my DB in mongoDB Atlas, I started to see egress cost are going high $25 so far for this month. My average payments in previous months were around $4 (Hobby waived plan)
My question is, how could I reduce this cost? Would I need to set up a mongoDB database in railway itself to avoid these costs?
30 replies
Changes in railway CLI?
I run deploys through Github Actions, following this post https://blog.railway.app/p/github-actions
I only have one project/service and now I get an error saying "Multiple services, specify it using --service"
I am wondering if anything changed in CLI
6 replies
Not having the same DateTime in Localhost vs Railway app deployed.
I'm sending a request to my backend using dayjs, I send the request in format DD-MM-YYYY, in localhost I'm having this response:
{ startDate: 2023-03-26T03:00:00.000Z }
{ endDate: 2023-03-27T02:59:59.999Z }
Which makes sense to me since I'm GMT -3
Now, when the app is deployed and I send the same request I have the following dateTime:
{ startDate: 2023-03-26T00:00:00.000Z }
{ endDate: 2023-03-26T23:59:59.999Z }
Which I feel is UTC.
The stack I'm using is MERN. To work with date time I'm using dayjs.
This is the code
const startDate = dayjs(req.query.date as string, 'DD-MM-YYYY')
.startOf('day')
.toDate();
const endDate = dayjs(req.query.date as string, 'DD-MM-YYYY')
.endOf('day')
.toDate();
console.log({ startDate });
console.log({ endDate });
const orders = await Order.find({
date: { $gte: startDate, $lte: endDate },
});
return res.status(200).json(orders);
9 replies