-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Repo + Add Html Parser (#134)
* use const/let over var --ES+ features ππ» .. * update example.js --better β¨ .. * update test file by add --spec π§ͺ.. * avoid generating package-lock.json βοΈ .. * update .gitignore file π .. * lint files π π» .. * update README.md π .. * update README.md π .. * add huskyrc --git --hooks πΊ .. * update travis ci pipeline π¨πΌβπ§ .. * add code for parse html π .. * add test for parse html π§ͺ.. * better pkg.json π ..
- Loading branch information
1 parent
ecc6ebf
commit afecb1a
Showing
13 changed files
with
566 additions
and
623 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
lib-cov | ||
*.seed | ||
*.log | ||
*.csv | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
# OS # | ||
################### | ||
.DS_Store | ||
.idea | ||
Thumbs.db | ||
tmp/ | ||
temp/ | ||
|
||
pids | ||
logs | ||
results | ||
|
||
npm-debug.log | ||
# Node.js # | ||
################### | ||
node_modules | ||
coverage/ | ||
package-lock.json | ||
yarn.lock | ||
npm-debug.log | ||
yarn-debug.log | ||
yarn-error.log | ||
|
||
|
||
.idea/ | ||
# NYC # | ||
################### | ||
coverage | ||
*.lcov | ||
.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"hooks": { | ||
"pre-commit": "npm run lint" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
language: node_js | ||
node_js: | ||
- "8" | ||
- "10" | ||
script: "make test-travis" | ||
after_script: "npm install [email protected] && cat ./coverage/lcov.info | coveralls" | ||
- 8 | ||
- 10 | ||
- 12 | ||
- stable | ||
script: | ||
- npm run test-ci | ||
after_script: | ||
- npm install coveralls | ||
- cat ./coverage/lcov.info | coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
var koa = require('koa'); | ||
var bodyParser = require('./'); | ||
const Koa = require('koa'); | ||
const bodyParser = require('.'); | ||
|
||
var app = koa(); | ||
const app = new Koa(); | ||
app.use(bodyParser()); | ||
|
||
app.use(function *() { | ||
app.use(async function() { | ||
// the parsed body will store in this.request.body | ||
this.body = this.request.body; | ||
}); | ||
|
||
app.listen(3000); | ||
const PORT = process.env.PORT || 3000; | ||
|
||
app.listen(PORT, () => | ||
console.log(`Server ready at http://localhost:${PORT} π ..`) | ||
); |
Oops, something went wrong.