Git Product home page Git Product logo

react-ssr-netlify-functions's Introduction

React SSR on Netlify Functions (Express)

This is a retake on Netlify's own demo, where this one is a bit more like the setup I myself prefer and am used to. Less magic (Parcel, Create React App) and less bundles: Just plain old Express with serverless-http. Tried to get Fastify and aws-fastify-lambda working, but to no avail. Maybe will return to those later.

Uses:

  • Webpack 4 with various loaders
  • React 16.13
  • Babel 7

Assumes that you'll use Netlify, obviously.

Running

There's not much magic going on here. You will need to manually (un)comment the client-side or server-side mode in src/index.jsx.

Install dependencies

Run yarn install or npm install.

Initialize project

  • Install Netlify CLI with yarn global add netlify-cli or npm install -g netlify-cli
  • Login with netlify login
  • Setup Netlify project and point this code-base there

Local

Switch to CSR mode first.

Use one of:

  • netlify dev, or
  • yarn start/npm run start

Deploy

Switch to SSR mode and run yarn deploy or npm run deploy.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.