File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 4
4
5
5
### Install command line tools
6
6
7
- > requires [ yarn ] ( https://classic.yarnpkg.com/en/docs/install/ ) or [ npm ] ( https://www.npmjs.com/get-npm )
7
+ Open your terminal, copy the the command below and run it:
8
8
9
9
``` bash
10
10
# install cli
11
- # you can use npm instead: `npm install -g @letsh/cli`
12
- yarn global add @letsh/cli
11
+ # optional: you can use npm or yarn instead: `npm install -g @letsh/cli` or `yarn global add @letsh/cli`
12
+ curl -o- -sL https://install.let.sh.cn/install.sh | bash
13
+ ```
14
+
15
+ ### Login
13
16
17
+ ``` bash
14
18
# login with your github account
15
19
lets login
16
20
```
17
21
18
- ### Then clone project and deploy with a single command line
22
+ ### Then clone example project and deploy with a single command line
19
23
20
24
#### Static hosting
21
25
@@ -25,6 +29,14 @@ cd static
25
29
lets deploy -t static
26
30
```
27
31
32
+ #### React
33
+
34
+ ``` bash
35
+ git clone https://github.com/let-sh/example
36
+ cd react
37
+ lets deploy -t react
38
+ ```
39
+
28
40
#### Node express framework
29
41
30
42
``` bash
Original file line number Diff line number Diff line change @@ -8,9 +8,4 @@ if (!process.env.PORT) {
8
8
9
9
const port = + process . env . PORT ! ;
10
10
app . get ( "/" , ( _req , res ) => res . send ( "Hello Oasis!" ) ) ;
11
- app . get ( "/env" , ( _req , res ) => {
12
- res . statusCode = 200 ;
13
- res . setHeader ( "Content-Type" , "application/json" ) ;
14
- res . end ( JSON . stringify ( process . env ) ) ;
15
- } ) ;
16
11
app . listen ( port , ( ) => console . log ( `Example app listening on port ${ port } !` ) ) ;
You can’t perform that action at this time.
0 commit comments