1.14.2 • Published 5 years ago
avnpc v1.14.2
avnpc.js
Backend API for avnpc.com
A pure node.js blog micro service
- API style: both support RESTFul / GraphQL
- Blog posts content be able to store in a github repo (hexo compatibled) or an Evernote account
Deployment
- Setup a github hexo repo like:
hexo init avnpc.content
- Run avnpc.js server with database
- Sync hexo repo posts to database once by command
node build/cli.js sync:github:db
- Create a github webhook, set
http://avnpcjs_project/v1/github/hook
as Payload URL
How to use
Create a post:
- Write a post by
hexo new post "new post title" -s "new-post-slug"
- Commit and push to github
- That's all
Update a post:
- Update hexo file on github
Remove a post:
- Change hexo file meta info from:
published: true
topublished: false
Development
make pre-build
make install
cp config/default.js config/config.local.development.js
Change database configs due to your local environment
make migrate
After database ready, run web server by
npm run dev
npm run swagger-dev
Visit RESTFul API by http://localhost:15638/
Visit GraphQL API by http://localhost:3000/v1/graphql/ui
How to test webhook
brew cask install ngrok
ngrok http 3000
replace github payload to ngrok domain
1.14.2
5 years ago
1.14.1
5 years ago
1.14.0
6 years ago
1.13.0
6 years ago
1.12.1
6 years ago
1.12.0
6 years ago
1.11.1
6 years ago
1.11.0
6 years ago
1.10.3
6 years ago
1.10.2
6 years ago
1.10.1
6 years ago
1.10.0
6 years ago
1.9.4
6 years ago
1.9.3
6 years ago
1.9.2
6 years ago
1.9.1
6 years ago
1.9.0
6 years ago
1.8.0
6 years ago
1.7.0
6 years ago
1.6.0
6 years ago
1.5.0
6 years ago
1.4.0
6 years ago
1.3.0
6 years ago
1.2.0
6 years ago
1.1.0
6 years ago
1.0.11
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago