jakeAnon
jakeAnon
Explore posts from servers
TTCTheo's Typesafe Cult
Created by jakeAnon on 8/3/2023 in #questions
Hosting Services
Hello everyone, I just wanted to get some additional opinions / validation on choosing the right hosting platform. I would like to use railway and vercel for work related projects. However since I would be using it in work/commercial setting, I need to be on the proper plan. Vercel unfortunately does not support PO's unless you are on the enterprise plan and I was quoted low to mid 4 figures monthly USD. Which seems excessive given I would only be hosting a few nextjs apps with minimal traffic as a sole dev. While with railway, I can be under the pro plan at an annual rate. This seems like a no brainer to just host everything on railway but has anyone experienced any issues with hosting prod apps on railway? and are there any significant difference between the two platforms that I would be missing from Vercel on railway? Would appreciate any input on the matter.
17 replies
RRailway
Created by jakeAnon on 6/27/2023 in #✋|help
Can railway be used in a work setting?
Hello, Are there any licensing issues I should be aware of prior to using Railway at work? For context, I work in the public sector and would like to use the railway platform to host a couple of scripts or API's.
8 replies
TTCTheo's Typesafe Cult
Created by jakeAnon on 6/22/2023 in #questions
Custom Headers Nextjs13
Hello, What is the correct way to access this custom header in next13? Accessing the request.headers.secret used to work this way prior to updating but it is now undefined. I can see the value when I log request.headers as well as when I log my API_ROUTE_SECRET any tips would be greatly appreciated console.log(request.headers); // exists in here console.log(request.headers.secret); // undefined
if (request.headers.secret !== process.env.API_ROUTE_SECRET) { return NextResponse.json({ message: "You are not authorized to call this API", }); }
6 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
Hello, I have no choice but to use python 2.7. However i am having trouble deploying my flask application.
python: No module named venv
python: No module named venv
venv doesnt exist until python 3 , how can i deploy it with virtualenv instead?
23 replies
RRailway
Created by jakeAnon on 3/27/2023 in #✋|help
Making flask app secure
Hello I have a simple flask app that is triggering some devices in my facility. I currently have cors and a secret-key needed in header in order for request to go through. How can I make my flask app more secure? do I need to set up gunicorn and nginx when deploying on railway? Open to any advice thank you ps. I am not expecting a ton of traffic to be hitting my endpoint
12 replies
TTCTheo's Typesafe Cult
Created by jakeAnon on 2/15/2023 in #questions
How to fall under api limitations with on demand data?
I have a react application that displays a map and the current vehicle position that is updated every 10 seconds. Api limits me to 150 requests every 15 min which is not an issue for myself, however if I am expecting to launch this to 50+ daily users. What would be best way to still serve the most up to date information while still falling under api limitations?
2 replies
TTCTheo's Typesafe Cult
Created by jakeAnon on 1/10/2023 in #questions
Correct way to get data based on email
Hello experimenting with t3-stack, What would be the correct way to query from my submissions table by checking if an email exists within the table ?
getSubmissionData: publicProcedure
.input(z.object({ text: z.string() }))
.query(({ input }) =>{
return prisma?.submissions.findUnique({where: {
email : input.email
}})
})
getSubmissionData: publicProcedure
.input(z.object({ text: z.string() }))
.query(({ input }) =>{
return prisma?.submissions.findUnique({where: {
email : input.email
}})
})
I do not have any submissions at the moment and am expecting it to return null or undefined. but I am instead getting
Property 'email' does not exist on type '{ text: string; }'.
Property 'email' does not exist on type '{ text: string; }'.
how can this be if I am expecting to pass in a string (users email)? Any clarification would be helpful thank you!
6 replies