shamsup / remix-starter-serverless

A template for deploying Remix to AWS with the Serverless framework
119 stars 13 forks source link

Which kind of serverless app to install? #8

Open cayblood opened 1 year ago

cayblood commented 1 year ago

The README says "If you want to use the Serverless Dashboard, you'll need to configure the Serverless CLI and add the app key to your serverless.yml file." Serverless presents several options, including "Node express.js API" and "Node REST API." Which type of app should I create, assuming I'm adapting this for Remix 2.0?

shamsup commented 1 year ago

I may have linked to the wrong place in the serverless docs. This is the link for the dashboard setup: https://www.serverless.com/framework/docs/guides/dashboard

This template circumvents initializing a serverless app, so you just need to register for the the dashboard and add your app and org to the serverless.yml file.

cayblood commented 1 year ago

Thanks. I'll try that and report back.

cayblood commented 1 year ago

@shamsup there's doesn't seem to be a way to install the serverless CLI without it trying to create an app for you. I can register at https://www.serverless.com/, but the moment you start to use the CLI, it prompts you to create an app as the first step. I don't see a way to initialize a serverless.yml file without creating a project.

shamsup commented 1 year ago

npm i -g serverless installs the cli (or yarn or pnpm). This template already has a serverless.yml file, so you shouldn't be initializing one.

Are you trying to use the serverless dashboard, or are you just trying to deploy a Remix app to AWS Lambda?

shamsup commented 1 year ago

If you run commands from the directory for this template, you shouldn't be prompted to initialize anything else. Commands like sls deploy, sls package, sls info, etc should work without having to create any additional accounts (other than your AWS account)

cayblood commented 1 year ago

@shamsup

If you run commands from the directory for this template, you shouldn't be prompted to initialize anything else. Commands like sls deploy, sls package, sls info, etc should work without having to create any additional accounts (other than your AWS account)

Doesn't the serverless.yml file need to be modified before running those commands? The bucket name, for example, needs to change, right? It's not clear that you can just run everything as-is and have it work.

I'm trying to use this project as a starting point for deploying a Remix 2 app on AWS Lambda with RDS Postgres as the backend DB. The grunge stack is designed for DynamoDB, so it requires some adaptation. I was thinking the best approach would be to try to create an empty serverless project and then copy remix code into it piece by piece, but I'm just trying to understand how others have done it already. Thanks for your time in responding.