Express boilerplate

This commit is contained in:
Clément GOUIN
2019-06-19 10:36:45 +02:00
parent db03535ee9
commit f170b4c3ea
8 changed files with 9886 additions and 13 deletions
+23 -11
View File
@@ -14,9 +14,10 @@ A static blog using Markdown pulled from your git repository.
![rss](./uml/rss.png)
## Installation
**1. Download the latest version from the repo**
**1. Download and install the latest version from the repo**
```bash
git clone https://github.com/klemek/gitblog.md.git
npm install
```
**2. Create your config file**
```bash
@@ -27,13 +28,13 @@ then edit the config.json file with your values :
> default values for config.json
````json
{
"node_port": 3000,
"data_dir": "data",
"nodePort": 3000,
"dataDir": "data",
"modules" : {
"plantuml" : true,
"rss": true,
"webhook": true
},
"plantuml" : true,
"rss": true,
"webhook": true
},
"home" : {
"index" : "index.ejs"
},
@@ -41,16 +42,27 @@ then edit the config.json file with your values :
"index" : "index.md"
},
"rss" : {
"endpoint" : "/rss",
"endpoint" : "/rss",
"length" : 10
},
"webhook" : {
"endpoint": "/webhook",
"secret_file": "git_secret"
"secretFile": "git_secret"
}
}
````
**3. Create and init your git source**
**3. Start your server**
```bash
npm start
#or
node server.js
```
This might want to use something like screen to separate the process from your current terminal session.
**4. Create and init your git source**
You need to [create a new repository](https://github.com/new) on your favorite Git service.
@@ -61,7 +73,7 @@ git remote add origin <url_of_your_repo.git>
git push -u origin master
```
**4. Refresh content with a webhook (optional)**
**5. Refresh content with a webhook (optional)**
At first start, a `git_secret` file will be generated, use it to create a new webhook as following :