Overview:
Remix Serverless is an adapter that allows developers to use the Serverless framework with Remix, as an alternative to the built-in Architect framework adapter. It provides the flexibility to use REST API Gateway instead of the enforced HTTP API Gateway. Additionally, it enables the deployment of the web client using the Serverless framework and supports the new composite functionality of the Serverless framework along with other Serverless framework stacks.
Features:
- Alternative to Architect Framework Adapter: Remix Serverless offers an alternative to the built-in Architect framework adapter included with Remix.
- Use REST API Gateway: With Remix Serverless, developers can use REST API Gateway instead of the enforced HTTP API Gateway.
- Deployment with Serverless Framework: Remix Serverless allows for the deployment of the web client using the Serverless framework.
- Support for Serverless Composite Functionality: Developers can utilize the new composite functionality of the Serverless framework along with other Serverless framework stacks.
Installation:
To install and use Remix Serverless, follow these steps:
- Bootstrap a new Remix project with the built-in Architect template.
- Add the following dependencies to your project:
// Add dependencies here
- Modify the
server.jsfile in the root directory:
// Modify server.js here
- Modify the
remix.config.jsfile:
// Modify remix.config.js here
- Add a
serverless.yamlfile with the following configuration:
# Add serverless.yaml configuration here
Install two Serverless plugins:
serverless-s3-syncfor uploading Remix public assets and client build output to the asset bucket, andserverless-apigateway-service-proxyto enable API Gateway proxy configuration against S3.Run
serverless deployafter a successful Remix build with the defaults to upload the artifacts and create the necessary infrastructure to host the site.
Summary:
Remix Serverless is an adapter that allows developers to use the Serverless framework with Remix, offering an alternative to the Architect framework adapter. It provides the option to use REST API Gateway and supports the deployment of the web client using the Serverless framework. Future improvements aim to enhance the packaging of the Remix server lambda artifact and provide more efficient deployment by excluding unnecessary node modules.