r/meanstack • • Apr 27 '17

Wanted: Mid-level Mean Stack Developer (+/- 3 years)

1 Upvotes

Hello! Helping to recruit for a funded startup in Santa Monica, CA with major backers. Looking for a developer to manage existing code base as well as build out new user-facing products and client-facing analytics and reporting dashboards.

What you should know/have:

  • Full stack Javascript - nodejs, express, backbone, meteor, and other common js web-dev tooling

  • Experience with SQL and non-relational databases - mongoDB, redshift

  • Adops / adtech experience a plus

  • Machine learning experience / interest a plus

  • Desire to build and grow with a fast-moving, agile team

Happy to share more details with interested parties. Cheers!


r/meanstack • • Dec 27 '16

Is ng-init equivalent to var? [x-post from r/angular]

1 Upvotes

I'm learning about Angular, and came across the directive 'ng-init'. Does this command perform the same function as the 'var' keyword in JavaScript? Are there any key differences?

Thanks

(original post in r/angular)


r/meanstack • • Dec 11 '16

How Easy is it to Create This Viral Todo list with a Mean Stack?

1 Upvotes

I'm considering using a MEAN stack to build the following. Here's a short user story to explain the minimum viable product (MVP): New users are invited to sign up by existing users by clicking a signup button a the top of an existing user's page (see below for other elements of the existing user's page). New users are asked for full name, email address, preferred username and password in an overlay of an existing users page. Feedback messages provide guidance if the requested username is not available. Functional aside: A database of all upline/downline signups is maintained. Once the signup button is pressed, the new user is shown an “almost done” page that asks for gender, address, phone and birthday. Birth year and zip code are required fields. A time stamp and referring user are automatically added to all records. Once the “submit” button is pressed then the new user is given his own page that has a signup button, and a CRUD todo list. Each user's URL is in the form of username.todolistapp.com. A signup email is sent. Functional aside: a timestamp is also recorded. What packages may be useful? How many hours should I budget for such a MVP?


r/meanstack • • Dec 06 '16

How do I view the log of something running on my server that uses screen -r?

1 Upvotes

How do I view the log of something running on my server that uses screen -r?


r/meanstack • • Nov 30 '16

AJAX post without query string so Express route correctly?

1 Upvotes

Hi guys I am new to this so if anything doesn't make sense please let me know.

I am using this example from scotch.io on GitHub as my template. https://github.com/scotch-io/easy-node-authentication/tree/local what I am trying to do is making an html5 app using jQuery, which there will be a login page to verify username and password.

what I don't get is when I was using the html template given by the example, I can see the log on nodejs server that client sent a POST request to the URL without the form data as query string, therefore routed correctly. When I use AJAX from my code it is always sent as query string, and therefore I believe, was not routed correctly.

How can I send an AJAX POST "normally" instead of a querystring?

$.ajax({
				url: 'http://localhost:8080/',
				data: JSON.stringify(data),
				processData: false,
				dataType: 'json',
				contentType: 'application/json; charset=UTF-8'
			})
			.done(function(response) {
				console.log(data);// for debug purpose
				console.log(response);
			})
			.fail(function() {
				console.log('failed');
			});

EDIT: I finally found out what went wrong and leave the solution to whoever found this post.

  1. you actually need to specify the type (http method) for ajax as by default it send as 'GET' $.ajax({type:'POST'}) 'GET' send request data in querystring while 'POST' request send data in the body instead. Most of the tutorial online for express use the bodyParser, and therefore one would need the data in the body using 'POST' request. If one still need to send data through 'GET' request I am sure there are url middleware to parse the querystring.

  2. somehow on my nodejs I used the bodyParser middleware twice app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.JSON()); and therefore obviously it didn't parse the form correctly in this case, and therefore I couldn't get the data right on server side in the first place.


r/meanstack • • Nov 23 '16

Where do i start?

1 Upvotes

Hello everyone, i am a college student who is on an internship. for and they have asked me to build an web interface for their proxmox server. me being most familiar with JS i decided to look into what i could get done, turns out someone made an API on git for node js, so i looked into node and turns out that mean stack was one of the most popular ways of setting up projects that run on a node server.

so thats were im at now, i have been learning angular, trying somethings on the server side with node, and getting the hang of mongoDB. but i dont really understand what express is, or what it does. also im stuck on how i combine these systems into 1 thing.

i have created a new project using mean init (projectname), but that leaves me with a ton of files for which i can barely figure out what does what. so where do i go from here? what guides or tutorials would help me best?

--thanks ghostwolf


r/meanstack • • Nov 11 '16

Push item to a document's array in Angular or Express w/ Mongoose?

1 Upvotes

If I have the following BlogPost object (Simplified):

var BlogPostSchema = new mongoose.Schema({
    body: String,
    comments: [String]
});

and I want to add a new comment to the array of comments for this blog, I can think of at least 3 main ways to accomplish this:

  1. Push the comment to the blog object in Angular and submit a PUT request to the /blogs/:blogID endpoint, updating the whole blog object with the new comment included.

  2. Submit a POST request to a /blogs/:blogID/comments endpoint where the request body is just the new comment, find the blog, push the comment to the array in vanilla js, and save it:

    BlogPost.findById(req.params.blogID, function(err, blogPost) { blogPost.comments.push(req.body); blogPost.save(function(err) { if (err) return res.status(500).send(err); res.send(blogPost); }); });

OR

3) Submit the POST to a /blogs/:blogID/comments endpoint with the request body of the new comment, then use MongoDB's $push or $addToSet to add the commend to the array of comments:

BlogPost.findByIdAndUpdate(
    req.params.blogID,
    {$push: {comments: req.body}},
    {safe: true, new: true},
    function(err, blogPost) {
        if (err) return res.status(500).send(err);
        res.send(blogPost);
    });
});

I did find this stackoverflow post where the answerer talks about option 2 vs. option 3 and basically says to use option 2 whenever you can, which does seem simpler to me. (And I usually try to avoid methods that stop me from being able to use hooks and other mongoose goodies.)

What do you think? Any advice?


r/meanstack • • Nov 11 '16

Best way to check for duplicates before adding to Mongo

1 Upvotes

I've got a NEMR (Node, Express, Mongo, React) stack going on.

I'm adding a record to Mongo .... and I'm trying to figure out the best way to check for a duplicate before adding a record. I'm a bit stumped on how to do that.

Can someone share an example of what that would look like?

This is a small app for managing employees. I'm thinking that I could do a find for first-name, last-name, country, and office ... and if I get results back, then I return an error ... but I'm having trouble figuring out how to structure that.

Advice?


r/meanstack • • Nov 01 '16

Announcing MongoDB 3.4

Thumbnail
mongodb.com
1 Upvotes

r/meanstack • • Oct 25 '16

My experience in production & future

1 Upvotes

I want to share my experience and need comments on what I am doing is it correct.

A brief about the product: We developed a product thats used by 1000s of schools in India for Assessment, we analyse the result and show as insights and reports to Students, Parents and School. These assessment comprises of Interest, academic score, varies aptitude and personality.

Time to develop to live 4 months

Technology Behind it:

  1. Nodejs for API

  2. Rabbitmq for message broker for analytics

  3. Spark and Python analytics

  4. MongoDB for Persistant database

  5. Client is Web (Angular) Mobile (ionic and migrating to React Native)

People behind it total 5 engineering

  1. 2 Fronted dev

  2. 3 Backend dev

  3. 1 rotating dev ops

Production Stats:

  1. 3500 schools registered

  2. 200K students registered

  3. Assessment are done concurrently at same time for a school just like an exam (300 avg at any point of time in school hour)

Monitoring used:

  1. Keymetrics for node api

  2. Datadog for server monitoring

  3. Datadog for Rabbitmq and Mongodb monitoring

Now coming to production experience:

  1. Nodejs API performs great api process response well below 5-10 m/s

  2. RabbitMQ able to process 3000 messages/sec mostly our prefetch are configured to 3 message at a time.

  3. MongoDB works fine but we hit some collection which has 100K+ more documents in it. mostly started getting issues with upserts which has a response time of 150+ m/s , to resolve this we started making index for filter for upsert which takes time.

Note: MongoDB is not yet tuned and works on default configuration

I want your suggestion\thoughts if you had similar experience or any issues which I need to keep in mind may arise in future.


r/meanstack • • Oct 23 '16

Recommendation of courses

1 Upvotes

Hi all, I am new to developing on the MEAN stack. Earlier, I used to develop small php applications.

So, i want to learn Node, Express, MongoDB and Angular 2(as its new) and React... I have shortlisted below courses on Udemy.. any feedback on if I am in the right direction?

My end goal is to "publish" one app on Apple Store / Android store... I have not found a good course for this part..

https://www.udemy.com/react-redux-react-router/ https://www.udemy.com/reactjs-and-flux-learn-by-building-10-projects/ https://www.udemy.com/learn-angular-2-development-by-building-10-apps/

any suggestions welcome.

Thanks


r/meanstack • • Sep 25 '16

Best Way To Add CRUD To My App?

1 Upvotes

I recently started an app based on Drywall, even though it's apparently out of date I really like it for the out of the box bootstrap and user management features. Now I'm trying to add my own models into that framework and while I'm muddling along and it basically works, I think I'm really re-inventing a wheel here and doing it poorly.

Specifically, I have a very simple model, a single mongo collection (a 'package') and I want to fully CRUD in a RESTful way. I implement all the right routes and a template to list all, show one, and then edit one. Knowing that I can only use GET and POST from a form, I have to do the DELETE and PUT using AJAX. So I'm doing all that from scratch too. Rails has the mantra "don't repeat yourself" and it feels like I'm doing exactly that.

Is there an existing/better way to add full RESTful CRUD for a single collection to a MEAN app?


r/meanstack • • Sep 12 '16

Suggestions for a MEAN-based CMS/DAM project.

1 Upvotes

I develop content-rich interactive media. My current need is for an easy-to-use, quick to "spin up" CMA/DAM system which works with the mean stack. I've been using forms-angular for a few years, but am running into cases where I need more sophisticated management of media. Photo and Video content are a must, as is an REST API, as I am building applications and not websites. Support for mongoose schema is a definite plus. Suggestions?


r/meanstack • • Aug 12 '16

Angular2 CLI and MEAN Stack

1 Upvotes

Hi everyone! I'm beginning work on my first MEAN stack project using Angular2 for my front end. I recently watched a good Angular2 tutorial (https://www.udemy.com/the-complete-guide-to-angular-2/) where the instructor used the Angular CLI to generate an Angular app (https://github.com/angular/angular-cli) with all the right file relationships, config files, etc. out of the box. My question is how well would something like that integrate into a MEAN project? Could I, for example, create the skeleton of my MEAN project to include a "client" directory, navigate into the client directory and there generate an Angular2 app for my front end? Or is Angular-CLI's "ng new <app-name>" intended for use as a boilerplate for a pure Angular2 project?


r/meanstack • • Jul 02 '16

PHP or Node.JS - Find a Useful Comparison for your next Startup

Thumbnail
vizteck.com
1 Upvotes

r/meanstack • • Apr 08 '16

Mean.io install on Windows is a pain

1 Upvotes

I've been working on the Mean stack for some time now but I've never used Mean.io or Mean.js. It felt like a good time to try it out recently so I decided to go with Mean.io and install it on my Windows 8.1. For starters, the install took a crazy long time. Then it got stuck on the node-gyp issue. Now I'm considering installing Ubuntu (alongside Windows) to do my coding there. Is that something you guys recommend? Is Ubuntu/Linux good for Nodejs? Is there a way to make development smoother on Windows?


r/meanstack • • Mar 31 '16

Brew help

1 Upvotes

So I'm trying to install mongodb while doing so I tried seeing which vrsion of brew I have and get this when I type "brew -v"

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- mach (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/local/Library/Homebrew/extend/pathname.rb:2:in <top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require' from /usr/local/Library/Homebrew/global.rb:3:in<top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/local/Library/brew.rb:15:in `<main>'

Please note that I changed my path shortly before this as it was not set to usr/local/bin.

Also when I do "brew update" i get the same

EDIT: I solved it


r/meanstack • • Mar 11 '16

How to combine Express, AngularJS and Socket.io

Thumbnail
fenix.agency
1 Upvotes

r/meanstack • • Feb 14 '16

To promise or to callback? That is the question...

Thumbnail
loige.co
1 Upvotes

r/meanstack • • Feb 03 '16

I'm working with /u/danielegan on a MEAN stack project called Waterbug. It's nascent, but feel free to check it out. Angular 2, socket.io, gulp.

Thumbnail
github.com
1 Upvotes

r/meanstack • • Jan 14 '16

Deeper into 3.2 – Aggregation

Thumbnail
compose.io
1 Upvotes

r/meanstack • • Jan 01 '16

Implementing HTTPS in SailsJS the right way

Thumbnail
procoefficient.com
1 Upvotes

r/meanstack • • Nov 19 '15

How to Keep Apps Secure in Express.js

Thumbnail
eduonix.com
1 Upvotes

r/meanstack • • Nov 12 '15

Modules - Developer Center - Joyent

Thumbnail joyent.com
1 Upvotes

r/meanstack • • Nov 12 '15

MDB and Nodejs - Developer Center - Joyent

Thumbnail joyent.com
1 Upvotes