File tree 6 files changed +79
-0
lines changed
6 files changed +79
-0
lines changed Original file line number Diff line number Diff line change
1
+ LEAN_ID = <Your LeanCloud ID>
2
+ LEAN_KEY = <Your LeanCloud Key>
3
+ LEAN_MASTER_KEY = <Your LeanCloud Master Key>
4
+ LEAN_SERVER = <Your LeanCloud Server>
Original file line number Diff line number Diff line change
1
+ .vercel
Original file line number Diff line number Diff line change
1
+ # Waline Example
2
+
3
+ This directory is a brief example of a [ Waline] ( https://waline.js.org/ ) app that can be deployed with Vercel and zero configuration.
4
+
5
+ ## Deploy Your Own
6
+
7
+ Deploy your own Waline project with Vercel.
8
+
9
+ [ ![ Deploy with Vercel] ( https://vercel.com/button )] ( https://vercel.com/import/project?template=https://github.com/walinejs/waline/tree/main/example )
10
+
11
+ ### How We Created This Example
12
+
13
+ ``` js
14
+ // index.js
15
+ const Waline = require (' @waline/vercel' );
16
+ module .exports = Waline ();
17
+
18
+ // vercel.json
19
+ {
20
+ " builds" : [
21
+ {
22
+ " src" : " index.js" ,
23
+ " use" : " @vercel/node"
24
+ }
25
+ ],
26
+ " routes" : [
27
+ {
28
+ " src" : " /(.*)" ,
29
+ " dest" : " index.js"
30
+ }
31
+ ]
32
+ }
33
+ ```
34
+
35
+ ### Deploying From Your Terminal
36
+
37
+ You can deploy your new Waline project with a single command from your terminal using [ Vercel CLI] ( https://vercel.com/download ) :
38
+
39
+ ``` shell
40
+ $ vercel
41
+ ```
Original file line number Diff line number Diff line change
1
+ const Application = require ( '@waline/vercel' ) ;
2
+
3
+ module . exports = Application ( {
4
+ async postSave ( comment ) {
5
+ // do what ever you want after save comment
6
+ } ,
7
+ } ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " template" ,
3
+ "version" : " 0.0.1" ,
4
+ "private" : true ,
5
+ "dependencies" : {
6
+ "@waline/vercel" : " ^0.24.0"
7
+ }
8
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " comment" ,
3
+ "github" : {
4
+ "silent" : true
5
+ },
6
+ "builds" : [
7
+ {
8
+ "src" : " index.js" ,
9
+ "use" : " @vercel/node"
10
+ }
11
+ ],
12
+ "routes" : [
13
+ {
14
+ "src" : " /(.*)" ,
15
+ "dest" : " index.js"
16
+ }
17
+ ]
18
+ }
You can’t perform that action at this time.
0 commit comments