Giter VIP home page Giter VIP logo

bp-nomonychas-reama's Introduction

Boilerplate NoMoNyChaS-REAMA

code coverage

A working base setup in August 2019 using Nodejs, Mocha, Nyc, Istanbul, Chai, Semantic-Release, Travis-ci, Codecov.io, Apollo, Express, Mysql and Authentication (with JWT: json web tokens)

Note: About Travis and Codecov.io, if you are developing a private project, it may make sense to switch to other services like CircleCi and something to replace codecov.io if you are on a tight budget.

Usage

Create a repo on github.com / bitbucket.com and use that name in place of your-project-name. Clone this repo into your computer

$ git clone [email protected]:gbili/bp-nomonychas-reama your-project-name
$ git remote remove origin
$ git remote add origin [email protected]:your-name/your-project-name

Then change the name.

vim package.json
:.,$s/bp-nomonychas-reama/your-project-name/g <enter>
:.,$s/gbili/your-name/g <enter>
:wq

Adapt the code in src/ and test/

Create a database and add the connection settings to the .env file like so:

DB_HOST=localhost
DB_USER=myuser
DB_PASSWORD=mypwd
DB_NAME=dbname

This will let the database undump command create the appropriate table. Of course you should then adapt the models and schema.sql table definitions to your own domain. For your tests you should create a separate database and pass the credentials through the .env file as well:

TEST_DB_HOST=localhost
TEST_DB_USER=test_user
TEST_DB_PASSWORD=test_password
TEST_DB_NAME=dbname_test

To create the database and users in MySQL run:

$ mysql -u root -p
$ ***** # enter your password

$ mysql> create database dbname_test;
$ mysql> create user 'test_user'@'localhost' identified by 'test_password';
$ mysql> ALTER USER 'test_user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test_password'
$ mysql> grant all on dbname_test.* to 'user_test'@'localhost';
$ mysql> flush privileges;

Then initialize and build

npm init
npm install
npm run build

Once installed, you can run:

npm run db:undump

Which should create the required tables defined in schema.sql.

Finally make commit and push changes

git commit -Am "feat: setup base project"
git push origin master

bp-nomonychas-reama's People

Watchers

gbili 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.