Host a GitBook in Express and secure it with Auth0 - the perfect setup for internal documentation!
MIT License
This boilerplate will allow you to setup kickass internal documentation in no time. The book will be built and hosted in a small Express application which uses passport-auth0
for authentication.
Demo: http://gitbook-boilerplate-demo.herokuapp.com/
More info: http://sandrinodimattia.net/better-internal-documentation-with-gitbook-express-and-auth0/
SESSION_SECRET
: The secret used to protect your session, please change this to something else.AUTH0_DOMAIN
: Your Auth0 DomainAUTH0_CONNECTION
: The connection to use by default (optional). Not setting this will show the Auth0 login page and allow you to choose a connection.AUTH0_CLIENT_ID
: Your Auth0 Client IDAUTH0_CLIENT_SECRET
: Your Auth0 Client Secretnpm run serve:book
: Host the book without authentication (useful for when you're writing content)npm run serve:dev
: Host the book with authenticationnpm run serve:prod
: Host the book with authentication (production)When you deploy this application and run npm install
it will also automatically build the book. This means you'll only need to execute the following after deploying your code somewhere (eg: Heroku, Azure Web Apps, ...):
npm install
npm run serve:prod