Giter Club home page Giter Club logo

express-api-boilerplate's Introduction

Starting point for a new Node.js Restful Api

The project includes full featured development kit to easily kickstart a new node API. It includes Docker/Mongo/Mariadb(Mysql) configuration files + a full Babel/Node.js ES6+ setup.

How to use ?

Clone the project and install dependencies

git clone [email protected]:hqro/Node-API-Boilterplate.git demo
cd demo
yarn install

Don't forget to remove .git directory

rm -Rvf .git
git init
git remote add ...

Development mode

yarn start

Tests mode

yarn test

Production mode

yarn build
yarn production

Full development environment with Docker

This projet can be start directly from Docker containers. You need to install docker and docker-compose to try this feature.

docker network create boilerplate
docker-compose -f stack.yml up -d

It will launch a Node.js, a MongoDB and a MariaDB instance with on your local machine with a persistant volume. You can check the configuration on stack.yml file. Don't forget to uncomment lines on index.js.

Aliases

You can now import easily from the root directory using @ symbol or with root folders names.

import '@/config/express' // import './config/express'
import demoHlpr from 'helpers/demo' // import demoHlpr from '../helpers/demo'
Why ?

This is a simple starter boilerplate to avoid to configure the same things each time you start a new project.

How it works ?

All the important files are in the src folder. The Express and Mongoose configuration files are in src/config folder. Each time you want to add a new route to your Api, you can call your mongoose schema, callback you controller and make the logic from an helper. Use de .env file to store your important informations such as your server port, your mongo password, or maybe an OAuth key...

express-api-boilerplate's People

Contributors

glarivie avatar hqro avatar pineli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.