Node 14.x.x
sudo n
copying : node/14.21.3
installed : v14.21.3 (with npm 6.14.18)
# development
$ npm run start
# watch mode & see the api list
$ npm run dev
Access to see api list http://localhost:3000/api
# production mode
$ npm run start:prod
curl -d "@./data/scrape-story.json" -H "Content-Type: application/json" http://localhost:3000/api/story/scrape
curl -d "@./data/story-to-mp3.json" -H "Content-Type: application/json" http://localhost:3000/api/transformer/story-to-mp3
curl -d "@./data/story-to-epub.json" -H "Content-Type: application/json" http://localhost:3000/api/transformer/story-to-epub
curl -d "@./data/epub-to-story.json" -H "Content-Type: application/json" http://localhost:3000/api/transformer/epub-to-story
curl -d "@./data/epub-to-mp3.json" -H "Content-Type: application/json" http://localhost:3000/api/transformer/epub-to-mp3
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Auto eslint
copy .vscode/settings.json
copy tsconfig.eslint.json
reload IDE
npm i nedb retry promisify axios cheerio
docker build -t nguyenngockhank/truyen .
docker push nguyenngockhank/truyen
docker run -dp 127.0.0.1:3333:3000 -v ~/Documents/truyendb:/app/db -v ~/Documents/truyenaudio:/app/audio truyen