Giter Club home page Giter Club logo

generator-meanstack's Introduction

Hi there ๐Ÿ‘‹

Software Engineer based in Dublin, Ireland.
Highly experienced in web technologies and frameworks.

Currently working in the Growth Analytics & Experimentation (a.k.a Growth Data) team at Hubspot Dublin.

How to reach me:

generator-meanstack's People

Contributors

sindresorhus avatar wlepinski-rga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-meanstack's Issues

How do I deploy this?

(Let me know if there is a better place to leave questions, like StackOverflow)

If I want a server to host both the front and back ends of the app from meanstack, what is the recommend way to deploy? I imagine it would work like this:

  1. grunt build:dist
  2. Point apache/nginx to dist directory
  3. node server.js to start up api that the front-end will interact with
  4. Have nginx reverse proxy this so it will point to someurl.com/api/someresource

Is this what you had in mind?

Add example api call from angular to express in documentation or code

Beginner angular user, total noob MEAN user here. Maybe I should be posting this to stack, but, I'd greatly appreciate an example either in the documentation or maybe from the angular main controller on how to call an express js route and retrieve some json. I understand how to use the services layer in angular, I think my problem is with express.

I've tried adding a route and currently have the following code returning 404 - Cannot GET /api/test
/routes/test.js

module.exports = function (app) {
    app.get('/api/test', function (req, res, next) {
        res.send('Hello World');
    });
};

Any ideas? Thanks.

--coffee switch

When I run:

yo meanstack --coffee

the scaffold files are JS not CS

how i can add admin item.

how i can add admin item.
i think to admin item separation user item
and in also think admin item can use yeoman.

how i do?

Livereload functionality does not appear to work

I've generated a project with 0.1.0 of this generator and run "grunt server".

I receive the following output:

Running "server" task

Running "clean:server" (clean) task

Running "concurrent:server" (concurrent) task

    Running "coffee:dist" (coffee) task

    Done, without errors.

Running "express:livereload" (express) task

Running "open:server" (open) task

Running "watch" task
Waiting...OK

Then a browser window is opened going to http://localhost:3000/, but in Chrome I receive the "Oops!" page in that it can't load the page as the server isn't started.

It is about 1 second later that this appears in the terminal (note: after the browser was launched by "watch" livereload):

Running "express-server:livereload:/var/folders/84/r6x7y3214tl81brhvjqyfpt00000gn/T/express1131120-42197-1hvbtcz/livereload.server" (express-server) task
Web server started on port:3000, no hostname specified [pid: 42200]

Running "express-keepalive" task

If I update app/index.html it does not reload trigger an update in the browser. I have tried CSS and JS files defined in the watch as well as the express server and EJS template files (even though it isn't defined).

I have not been able to find a cause for this after trying to rearrange the order in which "open", "watch" and "express:livereload" were defined in the "server" task.

Generate views files to support the scaffolding process.

We need to generate the views that will help us to input and read that of a specific entity created with the scaffolding process.

This views must support all operations (CRUD) and should be generated based on backend model fields.

Generate a scaffold command.

We need a scaffold command that generate each piece of a backend end to front end call and interface.

This issue is divided into other issues that need to be done before.

  • (#15) Generate Mongoose models on the backend during scaffolding process.
  • (#17) Generate related routes and route files for scaffolding process.
  • (#18) Generate a service file on the frontend side that connects with the backend routes.
  • (#19) Generate views files to support the scaffolding process.
  • (#20) Generate the controller on front-end side for scaffolding process.

Installation problem

Hi,

I am not too familiar with yo yet, and it is very much possible that I made a very obvious mistake.

I updated yo, installed the meanstack generator and have no errors on the command line:

Running "server" task

Running "clean:server" (clean) task

Running "concurrent:server" (concurrent) task

    Running "coffee:dist" (coffee) task

    Done, without errors.

Running "express:livereload" (express) task

Running "open:server" (open) task

Running "watch" task
Waiting...

The server seems to be running but the browser can't connect. lsof -i :3000 is blank, so no server is running on port 3000.

A standard AngularJS app does work, so yo in general seems to be ok.

Any ideas what the problem might by? I am on MacOSX, node is v0.10.12 and yo is v1.0.4.

Thanks,
Dirk

JSHint Errors

Right after scaffolding with yo meanstack, when I run grunt I get this:

$ grunt
Running "jshint:all" (jshint) task
Linting Gruntfile.js ...ERROR
[L55:C9] W015: Expected '}' to have an indentation at 11 instead at 9.
        },
Linting Gruntfile.js ...ERROR
[L56:C9] W015: Expected 'livereload' to have an indentation at 11 instead at 9.
        livereload: {
Linting Gruntfile.js ...ERROR
[L62:C13] W015: Expected '}' to have an indentation at 15 instead at 13.
            }
Linting Gruntfile.js ...ERROR
[L63:C9] W015: Expected '}' to have an indentation at 13 instead at 9.
        },
Linting Gruntfile.js ...ERROR
[L64:C9] W015: Expected 'test' to have an indentation at 13 instead at 9.
        test: {
Linting Gruntfile.js ...ERROR
[L65:C13] W015: Expected 'options' to have an indentation at 15 instead at 13.
            options: {
Linting Gruntfile.js ...ERROR
[L68:C13] W015: Expected '}' to have an indentation at 15 instead at 13.
            }
Linting Gruntfile.js ...ERROR
[L69:C9] W015: Expected '}' to have an indentation at 13 instead at 9.
        },
Linting Gruntfile.js ...ERROR
[L70:C9] W015: Expected 'dist' to have an indentation at 13 instead at 9.
        dist: {
Linting Gruntfile.js ...ERROR
[L71:C13] W015: Expected 'options' to have an indentation at 15 instead at 13.
            options: {
Linting Gruntfile.js ...ERROR
[L74:C13] W015: Expected '}' to have an indentation at 15 instead at 13.
            }
Linting Gruntfile.js ...ERROR
[L75:C9] W015: Expected '}' to have an indentation at 13 instead at 9.
        }
Linting Gruntfile.js ...ERROR
[L76:C5] W015: Expected '}' to have an indentation at 11 instead at 5.
    },
Linting Gruntfile.js ...ERROR
[L77:C5] W015: Expected 'open' to have an indentation at 11 instead at 5.
    open: {
Linting Gruntfile.js ...ERROR
[L78:C7] W015: Expected 'server' to have an indentation at 13 instead at 7.
      server: {
Linting Gruntfile.js ...ERROR
[L79:C9] W015: Expected 'url' to have an indentation at 15 instead at 9.
        url: 'http://localhost:<%= express.options.port %>'
Linting Gruntfile.js ...ERROR
[L80:C7] W015: Expected '}' to have an indentation at 13 instead at 7.
      }
Linting Gruntfile.js ...ERROR
[L81:C5] W015: Expected '}' to have an indentation at 11 instead at 5.
    },
Linting Gruntfile.js ...ERROR
[L82:C5] W015: Expected 'clean' to have an indentation at 11 instead at 5.
    clean: {
Linting Gruntfile.js ...ERROR
[L83:C7] W015: Expected 'dist' to have an indentation at 13 instead at 7.
      dist: {
Linting Gruntfile.js ...ERROR
[L84:C9] W015: Expected 'files' to have an indentation at 15 instead at 9.
        files: [{
Linting Gruntfile.js ...ERROR
[L85:C11] W015: Expected 'dot' to have an indentation at 17 instead at 11.
          dot: true,
Linting Gruntfile.js ...ERROR
[L86:C11] W015: Expected 'src' to have an indentation at 17 instead at 11.
          src: [
Linting Gruntfile.js ...ERROR
[L87:C13] W015: Expected '.tmp' to have an indentation at 19 instead at 13.
            '.tmp',
Linting Gruntfile.js ...ERROR
[L88:C13] W015: Expected '<%= yeoman.dist %>/*' to have an indentation at 19 instead at 13.
            '<%= yeoman.dist %>/*',
Linting Gruntfile.js ...ERROR
[L89:C13] W015: Expected '!<%= yeoman.dist %>/.git*' to have an indentation at 19 instead at 13.
            '!<%= yeoman.dist %>/.git*'
Linting Gruntfile.js ...ERROR
[L90:C11] W015: Expected ']' to have an indentation at 17 instead at 11.
          ]
Linting Gruntfile.js ...ERROR
[L91:C9] W015: Expected '}' to have an indentation at 15 instead at 9.
        }]
Linting Gruntfile.js ...ERROR
[L92:C7] W015: Expected '}' to have an indentation at 13 instead at 7.
      },
Linting Gruntfile.js ...ERROR
[L93:C7] W015: Expected 'server' to have an indentation at 13 instead at 7.
      server: '.tmp'
Linting Gruntfile.js ...ERROR
[L94:C5] W015: Expected '}' to have an indentation at 11 instead at 5.
    },
Linting Gruntfile.js ...ERROR
[L95:C5] W015: Expected 'jshint' to have an indentation at 11 instead at 5.
    jshint: {
Linting Gruntfile.js ...ERROR
[L96:C7] W015: Expected 'options' to have an indentation at 13 instead at 7.
      options: {
Linting Gruntfile.js ...ERROR
[L97:C9] W015: Expected 'jshintrc' to have an indentation at 15 instead at 9.
        jshintrc: '.jshintrc'
Linting Gruntfile.js ...ERROR
[L98:C7] W015: Expected '}' to have an indentation at 13 instead at 7.
      },
Linting Gruntfile.js ...ERROR
[L99:C7] W015: Expected 'all' to have an indentation at 13 instead at 7.
      all: [
Linting Gruntfile.js ...ERROR
[L100:C9] W015: Expected 'Gruntfile.js' to have an indentation at 15 instead at 9.
        'Gruntfile.js',
Linting Gruntfile.js ...ERROR
[L101:C9] W015: Expected '<%= yeoman.app %>/scripts/{,*/}*.js' to have an indentation at 15 instead at 9.
        '<%= yeoman.app %>/scripts/{,*/}*.js'
Linting Gruntfile.js ...ERROR
[L102:C7] W015: Expected ']' to have an indentation at 13 instead at 7.
      ]
Linting Gruntfile.js ...ERROR
[L103:C5] W015: Expected '}' to have an indentation at 11 instead at 5.
    },
Linting Gruntfile.js ...ERROR
[L104:C5] W015: Expected 'coffee' to have an indentation at 11 instead at 5.
    coffee: {
Linting Gruntfile.js ...ERROR
[L105:C7] W015: Expected 'dist' to have an indentation at 13 instead at 7.
      dist: {
Linting Gruntfile.js ...ERROR
[L106:C9] W015: Expected 'files' to have an indentation at 15 instead at 9.
        files: [{
Linting Gruntfile.js ...ERROR
[L107:C11] W015: Expected 'expand' to have an indentation at 17 instead at 11.
          expand: true,
Linting Gruntfile.js ...ERROR
[L108:C11] W015: Expected 'cwd' to have an indentation at 17 instead at 11.
          cwd: '<%= yeoman.app %>/scripts',
Linting Gruntfile.js ...ERROR
[L109:C11] W015: Expected 'src' to have an indentation at 17 instead at 11.
          src: '{,*/}*.coffee',
Linting Gruntfile.js ...ERROR
[L110:C11] W015: Expected 'dest' to have an indentation at 17 instead at 11.
          dest: '.tmp/scripts',
Linting Gruntfile.js ...ERROR
[L111:C11] W015: Expected 'ext' to have an indentation at 17 instead at 11.
          ext: '.js'
Linting Gruntfile.js ...ERROR
[L112:C9] W015: Expected '}' to have an indentation at 15 instead at 9.
        }]
Linting Gruntfile.js ...ERROR
[L113:C7] W015: Expected '}' to have an indentation at 13 instead at 7.
      },
Linting Gruntfile.js ...ERROR
>> Too many errors. (36% scanned).

Warning: Task "jshint:all" failed. Use --force to continue.

Aborted due to warnings.

Model folder?

Why did you remove it? Where should model files go?

After generating grunt fails : uncaught reference error

WARN [watcher]: Pattern "/Users/MyMBP/Development/yo-mean/test/mock/*/.js" does not match any file.
INFO [Chrome 31.0 (Mac)]: Connected on socket id 9k_VbFZPuhWNiJsnegMd
Chrome 31.0 (Mac) ERROR
Uncaught ReferenceError: angular is not defined
at /Users/MyMBP/Development/yo-mean/app/scripts/app.js:3
Chrome 31.0 (Mac): Executed 0 of 0 ERROR (0.922 secs / 0 secs)
Warning: Task "karma:unit" failed. Use --force to continue.

Generate the controller on front-end side for scaffolding process.

A controller is needed to calls functions on the backend. This controller must import the service previously created witht the scaffold process and export multiple functions to the views.

All operations of the CRUD must live within a single route on the frontend. If we created a Post entity using the scaffolding command, this means that the a route must be created on the angular side, pointing to the specific view and controller name.

jshint issue on app.js

When I run 'yo meanstack' and immediately run 'grunt' (without editing anything) I get the following errors/warnings:

Running "jshint:all" (jshint) task
Linting app/scripts/app.js ...ERROR
[L9:C17] W015: Expected 'templateUrl' to have an indentation at 11 instead at 17.
templateUrl: 'views/main.html',
Linting app/scripts/app.js ...ERROR
[L10:C17] W015: Expected 'controller' to have an indentation at 11 instead at 17.
controller: 'MainCtrl'
Linting app/scripts/app.js ...ERROR
[L11:C13] W015: Expected '}' to have an indentation at 9 instead at 13.
})
Linting app/scripts/app.js ...ERROR
[L13:C17] W015: Expected 'redirectTo' to have an indentation at 11 instead at 17.
redirectTo: '/'
Linting app/scripts/app.js ...ERROR
[L14:C13] W015: Expected '}' to have an indentation at 9 instead at 13.
});
Linting app/scripts/app.js ...ERROR
[L15:C5] W015: Expected '}' to have an indentation at 7 instead at 5.
});
Linting app/scripts/app.js ...ERROR
[L17:C1] W015: Expected '}' to have an indentation at 3 instead at 1.
}.call(this));
Linting app/scripts/app.js ...ERROR
[L17:C8] W040: Possible strict violation.
}.call(this));

Where is the MongoDB integration?

Thanks for providing the generator. Unfortunately I'm either missing something or it's not quite providing what I'm looking for. Is there any provision for integrating a mongdodb instance in the generator?

I'm still learning and need some crutches getting express and mongodb going which I was hoping this generator would do. How would I proceed to actually integrate the "M" of the mean stack?

Thanks again!

changes in server-side code lead to crash

After booting up with

  grunt server

changes in app.js are causing:

/private/tmp/lalala/node_modules/grunt-google-cdn/node_modules/bower/node_modules/tmp/lib/tmp.js:261
throw err;
^
TypeError: path must be a string
at Object.fs.openSync (fs.js:427:18)
at Object.fs.openSync (/private/tmp/lalala/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js:68:26)
at Object.fs.openSync (/private/tmp/lalala/node_modules/grunt-google-cdn/node_modules/bower/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js:68:26)
at openThenF (/private/tmp/lalala/node_modules/grunt-express/node_modules/touch/touch.js:76:40)
at touch_ (/private/tmp/lalala/node_modules/grunt-express/node_modules/touch/touch.js:69:10)
at optionsRef (/private/tmp/lalala/node_modules/grunt-express/node_modules/touch/touch.js:41:28)
at touch (/private/tmp/lalala/node_modules/grunt-express/node_modules/touch/touch.js:65:10)
at Function.touch.touchSync.touch.sync (/private/tmp/lalala/node_modules/grunt-express/node_modules/touch/touch.js:6:10)
at Object.touchFile (/private/tmp/lalala/node_modules/grunt-express/lib/util.js:11:9)
at StatWatcher. (/private/tmp/lalala/node_modules/grunt-express/tasks/express.js:108:14)
at StatWatcher.EventEmitter.emit (events.js:98:17)
at StatWatcher._handle.onchange (fs.js:1104:10)

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.