Use Meanjs Yeoman Generator

Source: Internet
Author: User

1. First install the generator globally

sudo npm install-g generator-meanjs

2. Create a path for the project

mkdir xmen && CD Xmen

3. Create an App

Yo Meanjs

Follow the prompts to enter the application name, description, keyword, whether to create a crud example:

4. Run the app

sudo node_env=development grunt

Running apps in a development environment

If you are running with the production environment, you need to do it before running, sir.

Grunt Build

5. Add Crud Module

Yo meanjs:crud-module Superheroes

6. For superheroes server model, add field

Open Xmen/app/models/superheroes.server.model.js

Add Superpower:{type:string,default: ', trim:true}

7. Add the above fields to the Crud method of the Superheroes client controller

Open Xmen/public/modules/superheros/controller/superheros.client.controller.js

8. Add the above fields to the client view of the superheroes

Open xmen/public/modules/superheros/view/

9. Add New Angular-controller and Angular-view

Yo Meanjs:angular-controller Team

Yo Meanjs:angular-view Team

Use Meanjs Yeoman Generator

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.