UNPKG

2.28 kBMarkdownView Raw
1
2# Infrastructure-Components
3
4Infrastructure-Components configure the infrastructure of your React-App as part of your React-Components.
5
6This piece of code is all you need to create, build, and deploy a **Serverless Isomorphic React App**!
7
8```
9/** index.tsx */
10import * as React from 'react';
11
12import {
13 IsomorphicApp,
14 WebApp,
15 Route
16} from "infrastructure-components";
17
18export default (
19 <IsomorphicApp
20 stackName = "my-isomorphic-app"
21 buildPath = 'build'
22 assetsPath = 'assets'
23 region='us-east-1'>
24
25 <WebApp
26 id="main"
27 path="*"
28 method="GET">
29
30 <Route
31 path='/'
32 name='My Serverless Isomorphic React App'
33 render={(props) => <div>Hello World</div>}
34 />
35
36 </WebApp>
37</IsomorphicApp>);
38```
39
40[This repository](https://github.com/infrastructure-components/isomorphic_example) provides a working example
41of a Serverless Isomorphic React App with Infrastructure-Components.
42
43
44## Installation
45
46You can install [infrastructure-components](https://github.com/infrastructure-components/infrastructure-components) easily
47
48```
49npm install --save infrastructure-components
50```
51
52
53[infrastructure-scripts](https://github.com/infrastructure-components/infrastructure-scripts)
54provide all the scripts required to `build`, `start`, and `deploy`. This lib contains many libraries that you only
55need during development/deployment. Thus, install this library as devDependency::
56
57```
58npm install --save-dev infrastructure-scripts
59```
60
61Infrastructure-components use the `Serverless framework <https://serverless.com/>`_ that you need to install globally::
62
63```
64npm install -g serverless
65```
66
67Finally, apps (e.g. single-page-app, isomorphic-app) and components (environment, webapp) can have further dependencies.
68Have a look at them in [our documentation](https://infrastructure-components.readthedocs.io).
69
70
71## Help and Support
72
73Have a look at our [documentation](https://infrastructure-components.readthedocs.io).
74
75Infrastructure-Components are under active development. If you find a bug or need support of any kind,
76please have a look at our [Spectrum-Chat](https://spectrum.chat/infrastructure).
77
78Further, we frequently publish descriptions and tutorials on new features on [Medium.com](https://medium.com/@fzickert).
\No newline at end of file