Stateless ES7 style Hapi restful API Server sample
aguid
babel
bcrypt
bluebird
boom
catbox-redis
code
eslint
good
good-winston-reporter
hapi
hapi-auth-jwt2
hapi-authorization
hapi-swagger
inert
hapi
joi-objectid
jsonwebtoken
lab
lodash
mongoose
redis
vision
winston
git clone https://github.com/raymondsze/hapi-of-the-world
operate mongodb in localhost:27017 (could change from config/default/database.js)
operate redis in localhost:6379 (could change from config/default/server.js)
npm install
node ./server.js
go to browser, swagger is pluged, you can visit localhost:8080/documentation
Yes, many TODOs in my mind, will update here if I have spare time.
- Add Like/Vote system to document, try use MQ to handle traffic
- Build separate frontend(server view) server to handle server side rendering for React view.
- Use React and Redux with Semantic UI to build single page website (frontend)
- Testcases with Lab and Code
I would like to make completely stateless restful api server.
Without session validation, we could make mobile and web using the same api without concern of CSRF attack.
If I understand wrong, please kindly tell me.