🐙 A blogging engine API built on HapiJS
Simple, powerful, flexible blogging engine, created as HapiJS study case with with purpose to be my website/blog core engine.
# clone repo
$ git clone https://github.com/lexmartinez/hapi-blog
# change directory to cloned app
$ cd hapi-blog
# install the dependencies with npm
$ npm install
# start the server
$ npm start
go to http://localhost:3000 in your browser.
What you need to run this app:
node
andnpm
(Use NVM)- Ensure you're running Node (
v7.x.x
+) and NPM (4.x.x
+)
After you have installed all dependencies you can now start developing with:
npm start
It will start a local server using nodemon
which will watch, build (in-memory), and reload for you. The application can be checked at http://localhost:3000
.
Environment variables must be configured into .env
file located at project root
PORT=3000
DB_HOST=127.0.0.1
DB_NAME=blog
DB_PORT=3306
DB_USER=root
DB_PASSWORD=password
DB_DIALECT=mysql
With the DB env variables configured, you can create all data schema with
sequelize.sync()
method see the sequelize docs
hapi-blog
has an ESLint integration for consistent code inspection, you can run that tool with command:
npm test
This API is ready to be deployed to Heroku through TravisCI (using the .travis.yml file and Procfile) you just need to create the heroku app and setup the heroku key on travisCI
This project is licensed under MIT License - see the LICENSE.md file for details