Tagged Questions
0
votes
0answers
14 views
functions in ejs
What I'd like to have is something like this:
app.js (node process, includes etc excluded for brevity but using ejs as rendering engine):
app.get('/', function(req, res){
var ejsVariables = {
...
0
votes
1answer
17 views
Jade - Accessing a variable passed to it
So I have a user stored in session when they log in on my Node.js application. I have admins and default users, if I output #{session.user.role} in the Jade template, I get default or admin appear. ...
0
votes
1answer
28 views
How to pull a unknown URL out of a String
I'm writing a Node/Express app and I have a text string in a JSON object that I need to pull a URL out of. The URL is different every time, and the string itself has two very similar URL's, and I only ...
0
votes
2answers
26 views
Running Node and Apache Side by Side
I am working on a project which allows users to monitor energy consumption. The main dashboard page is a web app which is pretty neat and makes extensive use of javascript and ajax. The server ...
0
votes
2answers
31 views
Running Page Specific Javascript in node.js
I am working on a project which allows users to monitor energy consumption. The main dashboard page is a web app which is pretty neat and makes extensive use of javascript and ajax. The server ...
0
votes
1answer
38 views
Creating a single page web app as part of a website
I am working on a project which allows users to monitor energy consumption. The main dashboard page is a web app which is pretty neat and makes extensive use of javascript and ajax. The server ...
1
vote
1answer
19 views
Setup page on first login, express.js
I'm using Passport.js to authorize user into my express.js app.
I want to show setup page when user logins first time.
Can I do this with Passport?
0
votes
0answers
15 views
Passport.js get sessions in callback
I want to move my express app from everyauth to Passport.js.
Workflow:
I'm showing setup page if user logins into app first time.
In everyauth I get session inside:
everyauth.twitter
...
0
votes
1answer
18 views
Oauth login and registration with custom username, express.js
I use node.js+express.js stack, users can reigster/login with twitter and facebook, and also can register with my native registration form. I use everyauth to handle with Twee and Fb.
The question ...
0
votes
1answer
16 views
heredoc on nodejs
Trying to use the Heredoc Method described here:
http://www.developfortheweb.com/2009/03/multi-line-strings-in-javascript/
var string = (<r><![CDATA[
The text string goes here. Since ...
0
votes
0answers
26 views
Access nodejs with web javascript but hitting XSS?
I have a nodejs app that runs a web server and works as a web API. Simple GETs to interact with it. My goal is to be as accessible as possible by any language or programmatic scenario. My biggest ...
0
votes
2answers
40 views
Node.js and socket.io, Clients not sharing counter
I'm playing around with node.js and socket.io, trying to get a counting program working. Basically what it should so is increase a shared counter by 1 each time a connected client presses a button, ...
0
votes
2answers
36 views
Bad data received from Arduino serial while reading from analog port
Maybe this is just a nonsense, but it's driving me crazy. I'm trying to read one analog port in Arduino and send the value through the serial port to JavaScript using node. When I show the data in the ...
0
votes
4answers
48 views
How to traverse JSON object locating particular property and pushing its contents to array?
I am working with a JSON object which can have a property ids at any leaf. I want to traverse the object and find all of the instances of the ids property and store each id in a collection.
Mocked up ...
0
votes
1answer
35 views
How to limit live streaming page to one connection per user?
I want to limit the limit users who connect to my live streaming page, such that users can't share passwords and login multiple times under the same account, from different locations.
I don't mind if ...