Tagged Questions
0
votes
0answers
9 views
Grid-FS not writing incoming posts to fs.files
I am attempting to accept a fax, decode it, and store the image directly into GridFS. This code succeeds but no file is being written to the database. I can't seem to figure out what I am doing wrong.
...
0
votes
1answer
10 views
XMLHttpRequest cannot load http://127.0.0.1:1337/. No 'Access-Control-Allow-Origin' header is present on the requested resource
I try to send and receive data from HTML page with Angular.js and locally running Node.js server
app.controller("MainController", function MainController($scope, $http){
$scope.postIt = ...
0
votes
1answer
14 views
mean.io cronjob | How to access server-side controllers directly?
How can I run some server-side script from cronjob/command-line? This script should be inaccessible from client-side.
0
votes
0answers
16 views
implementing API with PHP vs Node.js with tincan API
Hei
I am developing a web application for a online library management systems for a client (example), where teachers can assign books and students can read and rate the books.
So i think its kind of ...
0
votes
1answer
23 views
node.js Error: unsupported charset “UTF-8” [on hold]
I'm working through this tutorial. The view renders fine, but when I go to post a new todo I keep getting the error Error: unsupported charset "UTF-8" (it shows up both in my Chrome console and in the ...
2
votes
2answers
26 views
Is there a good way to create a server on ipad? (Node.js or Jetty)
I'd like to build an offline Hybrid app using angularjs, can I create a rest server on local ipad? (Node.js or Jetty)
0
votes
1answer
11 views
There are BI / OLAP tools for MEAN.JS platform?
Can anyone direct me to a framework of Business Intelligence or at least a Chart Tooling, preferably open-source, that properly integrates MEAN.JS platform on architecture SPA - Single Page ...
1
vote
1answer
21 views
How to properly handle files upload using Node.js Express backend?
I decided to use ng-flow, an Angular implementation of flow.js at front end to handle files uploading, I then picked multer as middleware to receive the files.
I did the most simple middleware setup ...
0
votes
2answers
24 views
Express - public directory divided for authorized/unauthorized users
I have an app written in express.js and I'm trying to divide this application to 2 sections:
one for unauthorized users (with routes only to / - landing page, /login and /* - error404)
and second ...
0
votes
1answer
20 views
How to pass data from EJS template to AngularJS controller
I've got the user data from ExpressJS through NodeJS as following:
app.js
app.get('/user', function(req, res) {
res.render('users', { title: 'Foo', user: req.user });
});
users.ejs
<%= ...
1
vote
1answer
19 views
Retrieving a Twitter-verified user's Tweets in node.js
I need a bit of help understanding how to extract Tweets from a verified user. Sorry for the open-ended question, but here goes:
https://github.com/ttezel/twit enables you to retrieve the tweets of ...
0
votes
1answer
37 views
Storing incoming files in a directory in Express JS
I am trying to configure ExpressJS to accept an incoming XML file for parsing. I have read that bodyParser has deprecated support for xml and I simply can't figure out how to make my application ...
0
votes
0answers
9 views
Socket.io emit stop emmting after page refresch
When user logges in, there is a socket.io connection established. Server checks if user has new messages and updates new messages count. When I navigate to different routes, and there is one more ...
0
votes
1answer
13 views
Ui Router - nested view not showing up ($viewContentLoaded not fired)
views/index.jade:
extends layout
block content
div(ui-view)
views/partials/user.jade
h1 Route 1
hr
a(ui-sref=".profile") Show Content
div(ui-view)
js/appStates.js
'use strict';
var app = ...
0
votes
1answer
30 views
Can't start Node js server in the example application of Angular
I downloaded Angular phonecat example phoject, moved to this directory and tried 'npm start' command. Result:
0 info it worked if it ends with ok
1 verbose cli [ 'node',
1 verbose cli ...
0
votes
0answers
19 views
Node.js Alternatives to WHM / cPanel [on hold]
I was wondering if somebody have come across this, or have some useful advice.
Basically, I have always worked with a PHP based WHM / cPanel setup. I love the simplicity of creating a new account, ...
0
votes
1answer
32 views
Angular SEO: Google Webmaster Tools and Prerender.io in Node.js server on Heroku
After following docs and tutorials about setting up a prerender.io server on heroku, GWT is still fetching and rendering my site without data.
prerender.io is caching the pages properly, I've set the ...
2
votes
0answers
32 views
MEAN asynchronous JS loading - require.js or promises?
Question
I am using a MEAN stack. I want to understand how to best utilize Node. I started doing some asynchronous JS library loading through require.js, but ran into Angular promises when creating a ...
0
votes
2answers
26 views
Request.post on already uploaded image file
I am using Angularjs and nodejs in the project and working on file uploads. I want to send the post request to the url endpoint in a secure way as I need to attach accesstoken with the request. So the ...
0
votes
0answers
9 views
Ionic, Socket.io and AngularJS, Acknowleage doesnt work
I'm using Ionic and Socket.io, and I have a problem to "fire" the acknowleage callback of emits..
In normal javascript the client side is:
function ack(response){
console.log(response);
}
...
0
votes
0answers
21 views
Image streamed from Mongo's Gridfs not displayed in browser
I am posting this issue here, I have been reading many related posts, but any of them helped me in making it work.
The idea is pretty easy: I have a MEAN-based application in which is possible to ...
0
votes
0answers
21 views
how to convert any logical query into mongodb query?
i have query like this:
var query='(("email=mk@gmailcom"|"ame=mk")&("email=mk1@gmailcom"|"nam=mk1"))&code=123';
but this may vary. how to convert this type of query into mongodb query ...
0
votes
1answer
18 views
Why I had an error, inside angular when I start the test?
Than I add this:
beforeEach(module('tabQuestionsApp'));
inside derictive test I has an error:
"C:\Program Files\nodejs\node.exe" ...
2
votes
5answers
63 views
Do i need node.js to use Angularjs?
I would like to use angular.js for my Image Editing Tool in my website.
Do I need node.js also ?.
I don't understand the scenario.if i don't need that one,when nodejs and angularjs both together?
0
votes
2answers
30 views
Why does npm install modules locally by default?
I'm new to the Node/Angular world (came from Ruby), and I'm just wondering...
Why does npm install modules locally in a project by default?
I've used both yeoman.io and mean.io to create two ...
0
votes
0answers
23 views
nodejs hapi single page
I have a single app site (NodeJS) and I want to migrate from Express to Hapi, what I normally do is serve static files and route everything else to a single page which contains the angularjs app and ...
0
votes
0answers
13 views
Share authentication info between angular request and browser reque
I'm generate an app with generator-angular-fullstack. It use passport to authenticate with angular request.
The app that is generated uses angular for almost everything at client side, just what I ...
0
votes
0answers
21 views
Saving sorted order to mongo using ui-sortable
I'm currently teaching myself the ins and outs of building a MEAN app. I started with the basic todo app and modified it pretty heavily to support multiple key value pairs and have updated the UI ...
0
votes
2answers
20 views
duplicates in socket.io w/ angular
Using angular and socket.io I am getting duplicate events on the client everytime the server emits. Angular is only included once, there is only one socket.io connection, and there is only one ...
1
vote
0answers
12 views
grunt-uncss with MEANJS project
I'm trying to run grunt-uncss over a MEANjs project
in my grunt file I have the following :
uncss:{
dist:{
options:{
urls:['http://localhost:3000']
...
0
votes
0answers
25 views
Express static routing depending on http referer
I'm making a website with Express and Angular.
I have three entry points :
/api/ -> The API
/admin/ -> Serves the Angular Admin
/ -> Serves the Angular Front
And to serve all the ...
0
votes
0answers
16 views
Convert csv format to json in strongloop app
I have an equipment that send some information to a web, this is what the equipment sends,
POST / HTTP/1.1
Host: 192.168.0.107
Accept: */*
Content-Length: 318
Content-Type: ...
0
votes
0answers
15 views
NodeJS / Mongoose Pagination with “distinct()”
I am using mongoose to retrieve data from mongoDB an then I am building an JSON (to use AngularJS).
I am doing:
app.get('/folder', function (req, res){
return Cars.find().distinct('folder', ...
0
votes
3answers
26 views
starting a web server for angular nodejs app
I am taking baby steps into the MEAN stack but can't figure out step 1, how to run my app. What do I use for a development web server and how do I start it in my directory?
If I just launch ...
0
votes
1answer
19 views
Working flow of Jasmine framework in protractor
I am new to Angular js & Protractor. Though by doing some research, I found out that Jasmine is the default framework used by Protractor but unable to understand the working flow of jasmine. ...
0
votes
2answers
23 views
Passport.js route not redirecting
UPDATE: Using a different path for my successRedirect I have managed to get a 200 response to my GET request (see code below). This is ONLY true the FIRST TIME I hit the route, though. Even so, the ...
-1
votes
0answers
31 views
AngularJS + NodeJS app - API security?
I am planning to build a site using AngularJS and use NodeJS to build the server side API. The site is going to be public facing anonymous access and wont be asking usesr to provide authorization ...
0
votes
1answer
24 views
How to permanently install MEAN.io package
I've installed a Contrib MEAN.io package to my project via the instructions here. The command line is like so:
mean install <package-name>
That added the package to my locally application ...
0
votes
0answers
39 views
Uploading a base64 encoded image to Node.js server not working
I'm using MEAN.io and i'm trying to upload a base64 encoded image.
Client side, AngularJS:
// Image we're going to send it out
var base64Image = files[i];
var file = {
...
0
votes
1answer
42 views
Working with promises in Angular
I am trying to adapt a NodeJs/AngularJs tutorial http://sahatyalkabov.com/create-a-tv-show-tracker-using-angularjs-nodejs-and-mongodb/ to using Postgres and the Sequelize ORM. The ORM has changed as ...
0
votes
1answer
34 views
Value not updating automatically in angularJS with socket.io
Following is my angularJS code with socket.io which is only fetching value when I switch from a view, though I was expecting it to update the value automatically. Let me know what I am doing wrong ...
1
vote
0answers
40 views
Using angularjs to get GET and POST result
If I'm using angularjs and wanted to alter the page based on whether there's a GET request or a POST request, how would i do it?
For example:
//index.html
...
<p>{{ message }}</p>
...
1
vote
2answers
16 views
$resource.query() parameters fail to arrive at server
Trying to implement a RESTful API using Node.js and Angular.
On the client side, I define a resource called songResource with the $resource function in Angular.
I then call the API with this ...
0
votes
1answer
15 views
MongoDB only one item, post or put?
POST to create a new item, PUT to update an item.. but what if there's only one item in the database?
Do I code: 'if item already exists, find it and PUT' else 'POST'
or am I missing something very ...
-2
votes
0answers
22 views
In a REST Api how do I know that my client is already logged in with Facebook or any other provider? [closed]
I'm using the MEAN Stack (Mongo, Express, Angular, Node) and I have always used the jwt library to generate my authentications token, and be able to validate if a client (web or mobile) is or is not ...
0
votes
1answer
35 views
Express JS not sending JSON in response to post request
I'm writing a little AngularJS app that's communicating with an ExpressJS backend for JSON. My server.js file looks like:
var express = require('express'),
app = express();
//Express 4
...
0
votes
0answers
29 views
Socket.io vs setInterval http request (ajax) [duplicate]
I've the following environment:
Server: node.js
Client: ionic mobile app
The user can subscribe to a service by leaving email. So in the app there are 3 status:
User not subscribed
User ...
0
votes
0answers
25 views
Sorting data AngularJS / NodeJS / MongoDB
I have more than 25000 data in a collection so I have to optimize for the front-end.
First with node JS, I did a pagination for the rest API:
app.get('/api', function(req, res, next) {
...
0
votes
0answers
12 views
Yeoman Full-Stack Generator and Nodejitsu deployment
I used Daftmonk's Yeoman Full-stack generator as scaffolding for an app I'm making. I'd like to run it using Nodejitsu's nodejs service. But when I deploy, I get a cascading series of errors, and even ...
0
votes
0answers
26 views
SPA Athentication AngulaJS -> PassportJS -> MongoDB
I am trying for days to setup Passport on SPA page. On Client Side i am using AngularJS $http and generaly it's working.
angular.module('Factory', []).factory('MainFactory', ['$http',function($http) ...