0

I'm a newbie when it comes to Node.js nad React.

I'm trying to deploy React Starter Kit — "isomorphic" web app boilerplate to the cloud. I'm currently using heroku, but I've read that I can do this using AWS Lambda and API gateway. I tried to do this using Serverless framework and also do this on my own but didn't succeed.

Running the serverless framework using a webpack plugin failed because my webpack file is written in ES6 and I don't know how to run babel before webpack (locally, I'm running babel-node that calls webpack).

As for doing this manually- I couldn't find instructions for the starter-kit setup - should I upload the entire folder to S3? how to define the lambda function? do I need to change something in my current code?

Any help would be appreciated.

Eldad
  • 1,067
  • 16
  • 36

1 Answers1

1

AFAIK, there isn't a direct way to use that isomorphic starter kit on Lambda. AWS Lambda and API Gateway can help you set up a serverless backend. And you can host your React app statically on S3. Here is a fork of the starter kit that you linked to, that does exactly that - React Static Boilerplate

There are ways to server side render your React app on Lambda but they are a bit cumbersome and not very straightforward. Here is an article outlining some basic aspects of it - Rendering React with Amazon Lambda

jayair
  • 1,241
  • 1
  • 9
  • 10
  • Thanks. It would be too cumbersome at the moment to port our code to the Statis boilerplate, so we'll stick with heroku for now. – Eldad Jan 27 '17 at 14:36