Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianleroux/arc-example-serverlessside-render-react
Architect + Parcel + Babel + Rollup + React
https://github.com/brianleroux/arc-example-serverlessside-render-react
Last synced: about 1 month ago
JSON representation
Architect + Parcel + Babel + Rollup + React
- Host: GitHub
- URL: https://github.com/brianleroux/arc-example-serverlessside-render-react
- Owner: brianleroux
- Created: 2018-02-19T18:24:21.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-19T18:24:37.000Z (almost 7 years ago)
- Last Synced: 2024-11-01T11:42:34.392Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://bs278o4pcf.execute-api.us-east-2.amazonaws.com/staging
- Size: 7.81 KB
- Stars: 24
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
How this works:
- src/views is a react app
`npm run build`
1. compiles the react assets into clientside assets `.static` with Parcel
2. `.static` gets copied into `src/shared/views`
3. compiles the react assets into a Node module that exports a single function (in src/shared/views) that accepts an object `{path, state}` and returns an HTML string using RollupRoutes use the Node module in src/shared/views (by requireing it with `require('@architect/shared/views')` to prerender the React code.
`npm run deploy` copies `.static` to s3 and deploys all the lambdas