Code Monkey home page Code Monkey logo

a2tasklist's Introduction

Node Todo App

A Node app built with BOOKSHELF.JS ,MySQL and Angular2. For demonstration purposes and a tutorial.

Node provides the RESTful API. Angular provides the frontend and accesses the API. Bookshelf is a JavaScript ORM for Node.js, built on the Knex SQL query builder.

Database Schema

In this example, I used a MySQL database with the following table:

CREATE TABLE `tasks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(45) NOT NULL,
  `isDone` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Requirements

  • Make sure you have Node and npm installed
  • Mysql: Make sure you have your own local or remote Mysql database URI configured in a2tasklist/config/db.js

Installation

  1. Clone the repository: git clone https://github.com/Mamadou208/a2tasklist.git
  2. Install the Api: npm install
  3. Install the angular2 application by cd into client folder and run: npm install
  4. Start the server: npm start
  5. compile angular code by cd into client folder and run: npm start
  6. Launch your favorite web browser and go to http://localhost:3000 for application or http://localhost:3000/api/tasks for API.

which will create these endpoints

Method URL Action
GET api/tasks Get all tasks
GET api/task/:id Get a task by id
POST api/tasks Create a new task
PUT api/task/:id Update an existing task
DELETE api/task/:id Delete an existing task

a2tasklist's People

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.