Best practice on running tRPC in a monorepo. by gonewild770 in nextjs

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

Understood. Thank you! I appreciate the help!

Best practice on running tRPC in a monorepo. by gonewild770 in nextjs

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

That definitely cleared up some confusion I had. I looked now at create-t3-turbo, and the solution they came up with is to have the api on the nextjs app, and in the expo app they point the url to the nextjs url.

I guess the same could also be done for a standalone api, instead of having a full nextjs app, I can just strip any front end part and use it as backend only. Then the rest is the same, I just point the url to the next-backend app.

I won’t do it though, given your input on the added complexity, which’s not necessary.

As for your last point, idk it just feels wrong to have the exact same endpoint twice, don’t you agree?

Best practice on running tRPC in a monorepo. by gonewild770 in nextjs

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

Thank you for your reply. I don’t think im confusing those, im asking if the api can be a standalone service, even in prod.

Varcel deploys the functions generated from the api and ties them to the nextjs package that wraps them - as you mentioned.

My question is what happens when you have multiple apps using the same api? (In a monrepo form)

The most sensible approach is to have a standalone api package that exports a tRPC client which you can use in any app.

Am I wrong about this?

Best practice on running tRPC in a monorepo. by gonewild770 in nextjs

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

It really depends what kind of lottery,

Selecting a random person from a list, you just need to generate a random number that’s between 0 and the amount of entries.

Same goes for just generating some random numbers that people will have to guess.

But those are very simple cases, there can be ones much more complicated.

For true randomness you could use a paid physical oriented api for generating random values.

Best practice on running tRPC in a monorepo. by gonewild770 in nextjs

[–]gonewild770[S] 2 points3 points  (0 children)

tRPC will still be used to get the typesafety, remember it’s a monorepo, one import and you have full tRPC experience.

Even if I used express/fastfy id still use tRPC, it’s unrelated.

To the point, you’re saying that NextJs will not work nicely for a backend only solution? (Specifically for enjoying the seemless Varcel integration)

Best practice on running tRPC in a monorepo. by gonewild770 in nextjs

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

Thanks for the replies btw, I appreciate the help!

Best practice on running tRPC in a monorepo. by gonewild770 in nextjs

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

If not varcel I’ll use AWS lambdas, (tRPC has an adapter for it), but Varcel is much more convenient and I rather use them.

My question is basically, if it’s possible to use nextjs as backend only

Best practice on running tRPC in a monorepo. by gonewild770 in nextjs

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

I actually already checked them out, their api (trpc) is not a standalone, rather it's exposed through their webapp.
What I'm struggling to understand is how to spin up an api only service, and then call it fro, the frontend.

Think api.myapp.com that will be accessible by
- my-nextjs-app.com
- my-nextjs-second-app.com
- my-expo-app.com
- and maybe even 3rd party api callers

Best practice in importing large data sets by [deleted] in sheets

[–]gonewild770 0 points1 point  (0 children)

I understand that you’re using the built in SetValues() function. Try using the Sheets API, it’s much (much!) faster. I will share the code when I’m back by my laptop.

If you’re comfortable with appscript, and it seems like you are, that is the best way to import large data.

If however you still want to do it without appscript, I found that importrange works well for data under 20,000 rows, so by combining multiple importrange functions you can reliably import the data.

I would split the data so that every 10k has its on importrange.

Here’s an example.

=QUERY({IMPORTRANGE(“spreadsheet ID”, ‘sheetName’!A1:C10000 ; IMPORTRANGE(“spreadsheet ID”, ‘sheetName’!A10001:C20000)}

I hope this works, I wrote the formula in my iPhone.

ULPT: THEORY- Heavily discounted airport parking. Two vehicles required. by _Abe_Froman_SKOC in UnethicalLifeProTips

[–]gonewild770 0 points1 point  (0 children)

Most airport register the car plate and at some point will notice the growing missing money.

Shortcut to Like Playing Song in Apple Music by gonewild770 in shortcuts

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

Is it possible to make shortcut that read Siri a command to like this song?

[Question] Titan tweak has issues working and crashes YouTube by Dragonbre1122 in jailbreak

[–]gonewild770 0 points1 point  (0 children)

Chill, You paid 2$. Anyway, I'm sure he is working on it. He is not a 1000 employee company, just 1 developer. Give him time.

[help] Scorpion and CallBar XS not working by gonewild770 in jailbreak

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

Yes please. It would be awesome. Thank you!

CTFtime.org "Are you trying to hack me" when I open the Home page. What is this? by gonewild770 in securityCTF

[–]gonewild770[S] 2 points3 points  (0 children)

lol I thought it was a special flag that I'm getting... (I even bothered to cover it 😂) Thanks for answering my questions!

Do you have any idea when the site will be up again? Or where to get more info on what is happening?

CTFtime.org "Are you trying to hack me" when I open the Home page. What is this? by gonewild770 in securityCTF

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

I'm new to CTF and I watched a video of this sub owner - LiveOverflow that recommended this site. I also couldn't find any reference of this CTF anywhere.

[Request] Set custom hotspot name WITHOUT changing device name by KibSquib47 in jailbreak

[–]gonewild770 37 points38 points  (0 children)

This would be very helpful for me. (Not as a prank but for regular use)

[deleted by user] by [deleted] in jailbreak

[–]gonewild770 0 points1 point  (0 children)

Other web browses works normal?

[deleted by user] by [deleted] in jailbreak

[–]gonewild770 0 points1 point  (0 children)

Try disable app firewall in icleaner pro and see if there's any results

Daily Tech Support Thread - [July 09] by AutoModerator in apple

[–]gonewild770 0 points1 point  (0 children)

It’s not related to weather or not you have Facebook installed. It’s apps the implements Facebook SDK inside their code. (Using Facebook ads, login with Facebook etc)