Skip to content

mamapi/tasks-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RESTful Tasks Manager Node.js

Basic example of tasks manager application, which uses React and Hapi, Sequelize, MySQL backend running on top Node.js

Demo: https://asana-v2.herokuapp.com/

alt text

Requirements

Installation Guide

Enter the following commands in the terminal

git clone https://github.com/mamapi/tasks-manager.git
cd tasks-manager
yarn install

Development

MySQL config

# config locate in: server/config/database.js
module.exports = {
  development: {
    username: 'root',
    password: null,
    database: 'tasks_dev',
    host: '127.0.0.1',
    dialect: 'mysql'
  },
  test: {
    username: 'root',
    password: null,
    database: 'tasks_test',
    host: '127.0.0.1',
    dialect: 'mysql'
  },
  production: {
    username: process.env.DB_USERNAME,
    password: process.env.DB_PASSWORD,
    database: process.env.DB_NAME,
    host: process.env.DB_HOSTNAME,
    dialect: 'mysql',
  }
}

# create development database
cd server/
./node_modules/.bin/sequelize db:create

# create test database
cd server/
NODE_ENV=test ./node_modules/.bin/sequelize db:create

# run migrations
cd server/
NODE_ENV=test ./node_modules/.bin/sequelize db:migrate

Develop Commands

# for working on the server
(cd server && yarn start)

# for working on the client
(cd client && yarn start)

# for working on both server and client
yarn start

# run api tests
(cd server && yarn test)

REST resource

task resource

  • GET - get 1 or more tasks

  • POST - add new one

  • PUT - update an existent one

  • DELETE - remove task by given id

  • PUT - change task status by given id

    To Do

    • RESTful using Hapi
    • CRUD on task list
    • ORM Sequelize
    • UI using React
    • History table
    • Transaction handle
    • Multi-language capability
    • Pagination
    • Filtering
    • Front-end validation
    • Front-end errors handling
    • Heroku deploy