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:
The MEAN stack generator for Yeoman.
Home Page: http://wlepinski.github.io/generator-meanstack/
License: MIT License
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:
(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:
grunt build:dist
dist
directorynode server.js
to start up api that the front-end will interact withIs this what you had in mind?
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.
After a fresh generation, if I type command "grunt server", the browser will open a page saying cannot connect to localhost:3000. But "grunt server:dist" works.
When I run:
yo meanstack --coffee
the scaffold files are JS not CS
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?
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.
Add an option during the scaffold of the application to create the Procfile and .env file.
Refencing : yeoman/generator-webapp#137
Getting error while $ yo meanstack
/usr/local/share/npm/lib/node_modules/generator-meanstack/node_modules/yeoman-generator/lib/util/common.js:5
'\n `---------ยด | ' + 'Welcome to Yeoman,'.yellow.bold + ' |' +
^
TypeError: Cannot read property 'bold' of undefined
We need to generate a file that connects with the backend routes previously created with on the issue (#17).
This file must be very similar to it backend counterpart. The naming convention must follow the backend to facilitate the code readability.
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.
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.
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
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.
Why did you remove it? Where should model files go?
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.
We need to create files for each route and declare those routes on the application's config.
This means we need to create basically 4 routes for the following tasks.
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.
As there are no examples of creating the app using this generator it would be very helpful to demo the basic application using this generator.
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));
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!
As title.
The developer should be able to choose between versions of AngularJS and jQuery using the default prompt implementation of yeoman.
We need to create a generator for the backend models. I'm planning to use Mongoose (http://mongoosejs.com/) mostly because I have more know how on it.
I also take advantage of this issues to ask if this is the best way to go. If you have used another kind of ORM with MongoDB and Express that facilitate the integration, please express yourself on this issue.
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.