hey all, the tutorials reference the folder called...
# help
p
hey all, the tutorials reference the folder called backend/ -- has this now changed to api/ ?
t
Ah yeah let me update this. Can you link the tutorial where you see this
Also the reactjs example does not work
and the nextjs example code does not work
the example has this:
Copy code
import {
  Api,
  ReactStaticSite,
  StackContext,
  Table,
} from "@serverless-stack/resources";
but it should be this:
Copy code
import { NextjsSite, StackContext, Table } from "@serverless-stack/resources";
I'm confused if I need to put files into maindir/api/ or maindir/frontend/api/
a
the first one is an api that has nothing to do with NextJS, and the second one is the NextJS api folder
p
so the examples reference /backend/ - where is that?
a
let me check out the example so that I don't make it even more confusing
I don't see a backend folder referenced in the NextJS tutorial
a
the backend referenced in your screenshot would be maindir/api
so I would put things in maindir/api/functions/ ?
a
only lambdas that our used outside of the context of NextJS app
it's unfortunate that the tutorials contain outdated information. there was a pretty big update of SST not long ago, and it seems some tutorials were not correctly updated
p
ahhh ok, as a new user i was really banging my head against the wall
a
also, you have to understand that the folder structure is not set in stone, and different frontends tend to come with different structures
p
What I'm trying to do now is create a nextjs crud app with the note example, so im trying to adapt bits from the nextjs example and bits from the crud dynamodb example
a
i see
last time I tried the Nextjs example, I couldn't even deploy it, because of some lambda@edge problems. I haven't tried again since then
p
yeah I had some issues with that, I think node prompted me to update something which seemed to help
a
i then switched to a completely different stack using Remix with CDK and no SST, but there is a Remix SST construct currently in the works, so I might switch back to SST if it works well
Remix is really cool
I'm a fan
p
remix instead of nextjs?
a
it is much simpler than NextJS in my opinion
p
ahh ok
a
yeah, I guess if you are mandated to use NextJS, it won't help you
p
well, if there is a working crud app connecting to dynamodb example that would be awesome
a
there is, let me grab the link
but it's without SST, like I said, just plain CDK
p
not serverless though?
a
yes, it is serverless
p
oh ok
a
it's actually a really cool setup with cypress, github actions, tailwind, etc. https://github.com/simonireilly/funk-stack
probably not the right place here to discuss it, though 🙂
p
hahaha yeah. are you also assisting with SST?
a
I'm just a user, but I try to help sometimes
just make a new post in help channel and i will take a look, but I'm not a big expert or anything
p
this is the help channel heh.
a
yeah, but we are currently in a thread
it's better to keep separate topics to separate threads
t
Sorry bit hard to follow the thread - where exactly are you stuck @Paul Stone
p
Some examples on the homepage reference a backend folder that does not exist @thdxr
Also the nextjs example code is broken
The reactjs example is broken because it refers to backend which doesnt exist and the nextjs example doesnt pull in the correct dependencies so that also does not work