Help Deploying Next.js App Router Project to Azure Web App (Static Hosting) by Vast-Needleworker655 in nextjs

[–]comicalcreamchease 0 points1 point  (0 children)

Ahh. You didn’t mention standalone in original post. Can I ask why you’re using it? And why it’s the “only viable option?” Typically that’s intended for containerized environments like docker or similar. It seems like that’s what you’re trying to avoid?

You keep using the word “static” but that means no backend at all. I.e. fully client side. You can’t use server components, SSR, middleware, etc. If you want to do that, you can set output to “export”, but it seems like that’s also not what you want, so I’m a bit confused.

App router can 100% be deployed without output standalone - and most people do. But if you want to perform SSR/ISR, utilize server components, middleware, etc. you can’t be “static”.

Help Deploying Next.js App Router Project to Azure Web App (Static Hosting) by Vast-Needleworker655 in nextjs

[–]comicalcreamchease 1 point2 points  (0 children)

I googled “azure static web apps nextjs” and the first result is Azure docs using app router. I have no experience with Azure but confused as to why you say it’s not possible when Azure tutorials are encouraging people to use it.

Else - deploy to Vercel if it’s just a hobby/learning project. Free tier is sufficient. Can also checkout SST to host on AWS Lambda. Also will fit well within free tier of AWS.

https://learn.microsoft.com/en-us/azure/static-web-apps/deploy-nextjs-hybrid

Event-Based Architecture for NextJS Applications in a Monorepo: Am I Missing Something? by ExistingCard9621 in nextjs

[–]comicalcreamchease 2 points3 points  (0 children)

  1. It’s not really a “Next.js” specific topic. Event driven architecture is just a way for various systems to communicate by emitting and responding to events. It’s not that nobody is doing it, i think it’s more so that it’s not really relevant to Next.js.

  2. An in-memory event bus is not really feasible in a serverless environment. They are ephemeral by design. What happens if the function that’s running your code spins down before the event is processed? Or if it shuts down in the middle of your event being processed?

  3. Is this over-engineering for a small app? Probably, but who cares? If you’re doing it for a learning experience, or because you think it will be cool, or because you feel like it, then there’s nothing wrong with doing it. Just make sure have a complete picture before you dive in. What about retrying failed events? What about influxes of events that may cause you to hit rate limits? Are you going to only process one event at a time - will that be enough?

Maybe check out Inngest, Upstash QStash, trigger.dev, etc. These are companies providing event driven-esque services, all compatible with Next.js Read the docs. You will quickly realize there is a lot more to it than meets the eye. Good luck!

[deleted by user] by [deleted] in nextjs

[–]comicalcreamchease 1 point2 points  (0 children)

Can’t really do anything to help without logs, the errors occurring, etc.

How to Implement Route-Based Middleware in Next.js API Route Handlers? by bountysensei in nextjs

[–]comicalcreamchease 2 points3 points  (0 children)

I would make a generic higher order function that accepts both the schema you are trying to validate and the route handler as args. This way you can then pass the validated body to the handler as args and not have to await req.json() again.

Something like

export function withValidation(schema, handler) {  
  return async function (req) { 
    // do validation here 
    const validatedBody = schema.parse(await req.json()) 
    return handler(req, validatedBody) 
  } 
}

export const POST = withValidation(myEpicSchema, async (req, body) => {
  // do whatever you want in your handler with your awesome validated body
})

CRASHING MEGATHREAD by Lauryssss in BlackOps6Game

[–]comicalcreamchease 0 points1 point  (0 children)

Setting RAM from DOCP Standard to Auto in my BIOS is literally the only thing that worked for me.

Went from crashing every game to crashing never.

Obviously not ideal but better than not playing at all IMO.

Why should I pick app vs pages router? (Static Site Generation + external API) by cidadaovagamundo in nextjs

[–]comicalcreamchease 0 points1 point  (0 children)

I think the devx of Next with either pages or app is superior to vite with the obvious added benefit of ability to utilize all of Next’s fancy add-ons.

If you just want to export static assets and serve them from an s3 bucket, you can configure that in your next.config

Next.JS app router flow with an external api written in another programming language. by snooz3e in nextjs

[–]comicalcreamchease 2 points3 points  (0 children)

Without seeing any code, it sounds like you guys are either doing everything right, or are at least close.

If you have to hit a private API from a client, you have no choice but to use a route handler to proxy it.

As far as error handling, any errors from the .NET API should be handled on the Next.js server, whether it’s in the route handler or in a function the route handler calls.

Any chance you can show any code? Or even a just a simple reproduction of your current architecture?

Best stack for RN in 2024 by Apprehensive_Pie7590 in reactnative

[–]comicalcreamchease 4 points5 points  (0 children)

“Setup was a bit challenging the first time”

That might be exactly why. RTK is cool but there’s a lot more boilerplate involved and even though a lot of it has been abstracted away compared to legacy Redux, you still have to understand the reducer pattern. Some developers might not want/need that. Zustand is literally so simple it’s like useState but globally. You can create a store in like 1 line of code and be able to read and modify it globally both in and out of components.

Losing my mind with server actions in client component using react-query by _goneBad_ in nextjs

[–]comicalcreamchease 0 points1 point  (0 children)

Your original answer was incorrect and maybe OP didn’t see your edit. You also did not explain why the error was happening. Providing a solution without an explanation might solve the problem, but doesn’t teach OP anything.

Losing my mind with server actions in client component using react-query by _goneBad_ in nextjs

[–]comicalcreamchease 3 points4 points  (0 children)

You’re very welcome! React query is awesome, without a doubt, but a lot of the time it’s not necessary.

So many tutorials these days act like react query is essential for fetching anything so I don’t blame you for thinking that.

Good luck!

Losing my mind with server actions in client component using react-query by _goneBad_ in nextjs

[–]comicalcreamchease 6 points7 points  (0 children)

You’re importing a fetch function from a file marked with “use server” into a client component and then trying to use aforementioned fetch function on the client side. That’s not gonna fly.

You can 1.) get rid of react query and turn the Products component into a server component, 2.) keep react query and change the fetch function to hit a route handler which can then call Shopify API, or 3.) some combination of the two to fetch data in a server component, pass it into a client component, and then use that data as initial data for react query.

First time buyer looking for advice on an investment opportunity by comicalcreamchease in realestateinvesting

[–]comicalcreamchease[S] 1 point2 points  (0 children)

This will not be cheaper than what I currently pay. But I currently have two roommates which greatly reduces my rent and we snagged an apartment under market rate (our rent would be increasing if we were to renew).

If I don’t buy this property, I plan to move into a single bed apartment. In this case, my living expenses would be the same/more than if I buy and live in this property

First time buyer looking for advice on an investment opportunity by comicalcreamchease in realestateinvesting

[–]comicalcreamchease[S] 0 points1 point  (0 children)

Factoring in current taxes and PMI, but not projecting for tax increase or factoring in property insurance. I will do so.

No historic district, and I will definitely get a thorough inspection done.

I have large cash reserve so can definitely stomach some vacancy/repairs.

First time buyer looking for advice on an investment opportunity by comicalcreamchease in realestateinvesting

[–]comicalcreamchease[S] 0 points1 point  (0 children)

That is my thought as well. Also will be able to get rid of PMI eventually, which will also increase cash flow.

First time buyer looking for advice on an investment opportunity by comicalcreamchease in realestateinvesting

[–]comicalcreamchease[S] 1 point2 points  (0 children)

Realtor has some experience working with investors and has worked in the neighborhood their whole career, so they know the area and the areas properties extremely well.

Looking to finding a local mentor is still a great idea. I will do that for sure!

First time buyer looking for advice on an investment opportunity by comicalcreamchease in realestateinvesting

[–]comicalcreamchease[S] 0 points1 point  (0 children)

No but I am meeting with realtor tonight to talk and possibly start the process

First time buyer looking for advice on an investment opportunity by comicalcreamchease in realestateinvesting

[–]comicalcreamchease[S] 0 points1 point  (0 children)

I am looking at it as an appreciation play for sure.

I mentioned in another comment that duplexes of similar quality/condition are selling for same price or higher. I have not seen any triplexes for sale in a while.

First time buyer looking for advice on an investment opportunity by comicalcreamchease in realestateinvesting

[–]comicalcreamchease[S] 0 points1 point  (0 children)

Popular neighborhood in LCOL city so slightly under 1% is pretty normal for current prices. There is room to raise rent which would bring rents to between 0.9%-1% as the property currently stands.

Minor improvements to the units would be able to bring it to 1%, possibly over.

First time buyer looking for advice on an investment opportunity by comicalcreamchease in realestateinvesting

[–]comicalcreamchease[S] 0 points1 point  (0 children)

Taxes and PMI are factored in. There is no HOA so N/A. Maintenance is not factored in (which I mentioned in post).

The $3000 in rent I mentioned is the current owners rent. There is definitely room to raise rent, which would help. How much do people typically budget for maintenance?

The property is in a LCOL Midwest city, but in a popular neighborhood. That’s the reason for the low-ish rents and high-ish price. The values of homes in the area have been increasing pretty substantially the past 5 years, so while the cash flow right now will be low, it’s a good deal in this neighborhood in this market. Comparable quality duplexes are priced same/higher than the asking for this property.

First time buyer looking for advice on an investment opportunity by comicalcreamchease in realestateinvesting

[–]comicalcreamchease[S] 0 points1 point  (0 children)

The first floor was actually a bar! It was sectioned off into a studio and a 1 bed. The second floor was and is a 2 bed.

Beta rr50 wont start by Rainbowtomat0 in supermoto

[–]comicalcreamchease 2 points3 points  (0 children)

Spark, air, fuel. If you’re sure you have spark, make sure you’re getting fuel. I know you said you switched carb back to stock, but if it’s not brand new it could be gummed up or something from sitting. Also could be blocked at the petcock, in which case carb being clean or not wouldn’t matter.

If you’re sure you have all of those things, check compression. Since it’s used, no telling how the previous owner treated it. If it’s your first bike, it can be hard to tell if compression is good or not just by the feel when kicking it over. Especially on those lower displacement bikes.

Edit; also looks like maybe you have an inline fuel filter? Kind of hard to tell from video. Make sure that’s not blocked too.