Need Help Starting Out ;-; (Next.js + Tailwind + Neon)
Hi y'all
I'm currently developing my portfolio site with Next.js 14 and the App Router and am very new to databases in general. The reason why I wanted to connect it to neon was to extend my portfolio to have full-stack capabilities: if I ever wanted to add something, I could just log in and then add stuff via a dashboard, etc. I've taken classes in Databases and PostgreSQL in my studies but am just now dipping my toes into getting connections set up to an actual web application. Looking on the Neon Documentation, a lot of existing resources uses the page routers, and if there is mention of the app router, there's not much pertaining to route handlers as a whole. Thus, I've been attempting to get connected by utilizing the neon serverless drivers, but overall I'm still very lost and am not sure where to go.
I have the following in a
And I attempted to make a connection by creating a route handler
I'm receiving the following errors thus far:
- on the
- on the
If anyone has any great starter resources or knows the issue with my approach, I'd appreciate any feedback whatsoever. I'm very eager to learn and am more than willing to listen.
Thanks,
AJ
I'm currently developing my portfolio site with Next.js 14 and the App Router and am very new to databases in general. The reason why I wanted to connect it to neon was to extend my portfolio to have full-stack capabilities: if I ever wanted to add something, I could just log in and then add stuff via a dashboard, etc. I've taken classes in Databases and PostgreSQL in my studies but am just now dipping my toes into getting connections set up to an actual web application. Looking on the Neon Documentation, a lot of existing resources uses the page routers, and if there is mention of the app router, there's not much pertaining to route handlers as a whole. Thus, I've been attempting to get connected by utilizing the neon serverless drivers, but overall I'm still very lost and am not sure where to go.
I have the following in a
.env.local file to start out, details omitted:And I attempted to make a connection by creating a route handler
app/api/neon/route.tsI'm receiving the following errors thus far:
- on the
const sql : "Argument of type string | undefined is not assignable to parameter of type string. Type undefined is not assignable to string."- on the
res.status. ...: "This expression is not callable. Type Number has no call signatures"If anyone has any great starter resources or knows the issue with my approach, I'd appreciate any feedback whatsoever. I'm very eager to learn and am more than willing to listen.
Thanks,
AJ
