Hacker Newsnew | past | comments | ask | show | jobs | submit | tadpol's commentslogin

Hey, Tier team, this looks promising! Is it possible to run Tier in NextJs API routes?


I am not super familiar with NextJS, but I'll take a look.

The Node SDK is a pretty standard Node library (not clientside JS, for probably obvious reasons). It does spawn a child process if it isn't given a TIER_SIDECAR environment variable, though, which is going to be pretty slow if you have stateless route handlers at the edge.

I'll poke at it today, but I think the way to go is to spin up a sidecar running somewhere with `tier serve`, and then give your NextJS API handlers an environment variable to know where to hit it.


I just played around with the NextJS starter demo app, and it seems like you can `import tier from 'tier'` and call `tier.subscribe()`, `tier.report()`, and `tier.limits()` without any issue in a NextJS API route.


There is Europass resumes which is quite common in Europe (At least in my country).

Is is a good think? For most of the job positions it is okay, but if you want to stand out you need to make something unique.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: