Giter Site home page Giter Site logo

filinamaria / mean-todo-tutorial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from if-itb/mean-todo-tutorial

0.0 2.0 0.0 1.21 MB

Tutorial pembuatan todo web app menggunakan MEAN (Mongo DB, ExpressJS, AngularJS, NodeJS) Stack.

License: MIT License

JavaScript 88.22% CSS 11.78%

mean-todo-tutorial's Introduction

MEAN Todo Tutorial

Tutorial pembuatan todo web app menggunakan MEAN (Mongo DB, ExpressJS, AngularJS, NodeJS) Stack.

Instalasi

MEAN.IO

Prerequisites

  • Node.js - Download and Install Node.js. You can also follow this gist for a quick and easy way to install Node.js and npm
  • MongoDB - Download and Install MongoDB - Make sure mongod is running on the default port (27017).

Tools Prerequisites

  • NPM - Node.js package manage; should be installed when you install node.js.
  • Bower - Web package manager. Installing Bower is simple when you have npm:
$ npm install -g bower

Optional Built with Grunt

  • Grunt - Download and Install Grunt.
$ npm install -g grunt-cli

Additional Packages

  • Express - Defined as npm module in the package.json file.
  • Mongoose - Defined as npm module in the package.json file.
  • Passport - Defined as npm module in the package.json file.
  • AngularJS - Defined as bower module in the bower.json file.
  • Twitter Bootstrap - Defined as bower module in the bower.json file.
  • UI Bootstrap - Defined as bower module in the bower.json file.

Step 01 - Quick Install

The quickest way to get started with MEAN is to install the meanio package from NPM.

Install MEAN CLI:

$ [sudo] npm install -g meanio@latest
$ mean init todoApp
$ cd todoApp && npm install

We recommend using Grunt to start the server:

$ grunt

If grunt aborts because of JSHINT errors, these can be overridden with the force flag:

$ grunt -f

Alternatively, when not using grunt you can run:

$ node server

Then, open a browser and go to:

http://localhost:3000

Step 02 - Generate Package Todo

Do following command in your terminal

mean package todos

You will get the following custom packages

    |_ packages
      |_ custom
        |_ todos
          |_ public
            |_ assets
            |_ controllers
            |_ directives
            |_ routes
            |_ services
            |_ views
            |__ todos.js
          |_ server
            |_ config
            |_ controllers
            |_ models
            |_ routes
            |_ views
          |__ app.js

Step 03 - Server Routing & Remove Authentication

In file packages > custom > todos > app.js, remove the roles authenticated so that we can access the todo routes without login

roles: ['authenticated'],

Then in add a controller and model in the server. You may test the server using POSTMAN, to get all todos, or add new todo

http://localhost:3000/todos

Step 04 - Angular Client Routing & Service

Male a controller, services, and fix the roues of the public folder. Don't forget to change the app.js to the same route of client.

mean-todo-tutorial's People

Contributors

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