Search Results

Search found 59291 results on 2372 pages for 'node set'.

Page 5/2372 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Node app crashes after a while on micro EC2 instance even with supervisor

    - by Justin Meltzer
    I'm using supervisor to start my node.js application on a micro EC2 instance. However, the app only stays running for some time until it eventually shuts down. Not exactly sure how long the app stays running but I'm guessing for about a few hours or so. Sometimes less. My question is where on the remote server should I be looking in order to debug this kind of issue? I'm running an Amazon Linux AMI.

    Read the article

  • How to create a link to Nintex Start Workflow Page in the document set home page

    - by ybbest
    In this blog post, I’d like to show you how to create a link to start Nintex Workflow Page in the document set home page. 1. Firstly, you need to upload the latest version of jQuery to the style library of your team site. 2. Then, upload a text file to the style library for writing your own html and JavaScript 3. In the document set home page, insert a new content editor web part and link the text file you just upload. 4. Update the text file with the following content, you can download this file here. <script type="text/javascript" src="/Style%20Library/jquery-1.9.0.min.js"></script> <script type="text/javascript" src="/_layouts/sp.js"></script> <script type="text/javascript"> $(document).ready(function() { listItemId=getParameterByName("ID"); setTheWorkflowLink("YBBESTDocumentLibrary"); }); function buildWorkflowLink(webRelativeUrl,listId,itemId) { var workflowLink =webRelativeUrl+"_layouts/NintexWorkflow/StartWorkflow.aspx?list="+listId+"&ID="+itemId+"&WorkflowName=Start Approval"; return workflowLink; } function getParameterByName(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(window.location.search); if(results == null){ return ""; } else{ return decodeURIComponent(results[1].replace(/\+/g, " ")); } } function setTheWorkflowLink(listName) { var SPContext = new SP.ClientContext.get_current(); web = SPContext.get_web(); list = web.get_lists().getByTitle(listName); SPContext.load(web,"ServerRelativeUrl"); SPContext.load(list, 'Title', 'Id'); SPContext.executeQueryAsync(setTheWorkflowLink_Success, setTheWorkflowLink_Fail); } function setTheWorkflowLink_Success(sender, args) { var listId = list.get_id(); var listTitle = list.get_title(); var webRelativeUrl = web.get_serverRelativeUrl(); var startWorkflowLink=buildWorkflowLink(webRelativeUrl,listId,listItemId) $("a#submitLink").attr('href',startWorkflowLink); } function setTheWorkflowLink_Fail(sender, args) { alert("There is a problem setting up the submit exam approval link"); } </script> <a href="" target="_blank" id="submitLink"><span style="font-size:14pt">Start the approval process.</span></a> 5. Save your changes and go to the document set Item, you will see the link is on the home page now. Notes: 1. You can create a link to start the workflow using the following build dynamic string configuration: {Common:WebUrl}/_layouts/NintexWorkflow/StartWorkflow.aspx?list={Common:ListID}&ID={ItemProperty:ID}&WorkflowName=workflowname. With this link you will still need to click the start button, this is standard SharePoint behaviour and cannot be altered. References: http://connect.nintex.com/forums/27143/ShowThread.aspx How to use html and JavaScript in Content Editor web part in SharePoint2010

    Read the article

  • Can't run node.js script on server reboot

    - by webstyle
    I need to listen events on port 3240 and I'm using node.js for that purpose. I need to execute my script with forever tool. I also need to run forever on server reboot. When I run forever glh.js everything works: forever list says there is a running process. But when I'm trying to run forever on server reboot I can't get it working. I've created a file in /etc/init.d with the following content: #!/bin/bash /var/www/yan/data/gitlabhook/runglh.sh &>/var/www/yan/data/gitlabhook/runglh.log When I reboot the server, the output log is the following (the same as when I run it manually via console): info: Forever processing file: glh.js But in this case forever doesn't start a process. forever list outputs: info: No forever processes running

    Read the article

  • Need algorithm to add Node in binary tree

    - by m.qayyum
    •if your new element is less or equal than the current node, you go to the left subtree, otherwise to the right subtree and continue traversing •if you arrived at a node, where you can not go any deeper, because there is no subtree, this is the place to insert your new element (5)Root (3)-------^--------(7) (2)---^----(5) ^-----(8) (5)--^ i want to add this last node with data 5...but i can't figure it out...I need a algorithm to do that or in java language

    Read the article

  • How to read XML parent node tag value

    - by kaibuki
    HI Guys, I have a java code to read XML nodes, I want to add in the addition and want to read the parent node value also. my XML file sample is below: <breakfast_menu><food id=1><name> Belgian Waffles </name><price> $5.95 </price><description> two of our famous Belgian Waffles with plenty of real maple syrup </description><calories> 650 </calories></food><food id=2><name>Strawberry Belgian waffles</name><price>$7.95</price><description>light Belgian waffles covered with strawberries and whipped cream</description><calories>900</calories></food></breakfast_menu> and my code for parsing xml is : public static String getProductItem(String pid, String item) { try { url = new URL(""); urlConnection = url.openConnection(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { } try { dBuilder = dbFactory.newDocumentBuilder(); } catch (ParserConfigurationException e) { } try { doc = dBuilder.parse(urlConnection.getInputStream()); } catch (SAXException e) { } catch (IOException e) { } doc.getDocumentElement().normalize(); NodeList nList = doc.getElementsByTagName("food"); for (int temp = 0; temp < nList.getLength(); temp++) { Node nNode = nList.item(temp); if (nNode.getNodeType() == Node.ELEMENT_NODE) { Element eElement = (Element) nNode; data = getTagValue(item, eElement); } } doc = null; dBuilder = null; return data; } private static String getTagValue(String sTag, Element eElement) { NodeList nlList = eElement.getElementsByTagName(sTag).item(0) .getChildNodes(); Node nValue = (Node) nlList.item(0); return nValue.getNodeValue(); } What I want to do is to read the "id" value of food, so if if I am searching for a food, it only checks those food nodes, whose id matched the food node id. thanks in advance. cheers.. kai

    Read the article

  • Is there a template engine for Node.js?

    - by Seb
    I'm kind of falling in love with Node.js not because you write app code in javascript but because of its performance. I really don't care a lot about how beautiful a server side language might be but how much requests per second it can handle. So anyway I'm looking forward to experiment building an entire webapp using Node.js (and going back to the actual question) is there a template engine similar to let's say the django template engine or something similar (that at least allows you to extend base templates) available for Node.js?

    Read the article

  • node.js simply does not run

    - by user309641
    I installed and ran node.js just fine on my mac, but even if I do this on windows chdir c:\testfolder node example.js then I get this error: node.js:201 throw e; // process.nextTick error, or 'error' event on first tick Error: Cannot find module 'c:\testfolder\example.js' at Function._resolveFilename <module.js:322:11> at Function._load <module.js:299:25> at Array.0 <module.js:499:10> at EventEmitter._tickCallback <node.js:192:40> I'm only even trying to run the example code on the nodejs website: var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/');

    Read the article

  • Apachebench on node.js server returning "apr_poll: The timeout specified has expired (70007)" after ~30 requests

    - by Scott
    I just started working with node.js and doing some experimental load testing with ab is returning an error at around 30 requests or so. I've found other pages showing a lot better concurrency numbers than I am such as: http://zgadzaj.com/benchmarking-nodejs-basic-performance-tests-against-apache-php Are there some critical server configuration settings that need done to achieve those numbers? I've watched memory on top and I still see a decent amount of free memory while running ab, watched mongostat as well and not seeing anything that looks suspicious. The command I'm running, and the error is: ab -k -n 100 -c 10 postrockandbeyond.com/ This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/ Benchmarking postrockandbeyond.com (be patient)...apr_poll: The timeout specified has expired (70007) Total of 32 requests completed Does anyone have any suggestions on things I should look in to that may be causing this? I'm running it on osx lion, but have also run the same command on the server with the same results. EDIT: I eventually solved this issue. I was using a TTAPI, which was connecting to turntable.fm through websockets. On the homepage, I was connecting on every request. So what was happening was that after a certain number of connections, everything would fall apart. If you're running into the same issue, check out whether you are hitting external services each request.

    Read the article

  • Proxy to either Rails app or Node.js app depending on HTTP path w/ Nginx

    - by Cirrostratus
    On Ubuntu 11, I have Nginx correctly serving either CouchDB or Node.js depending on the path, but am unable to get Nginx to access a Rails app via it's port. server { rewrite ^/api(.*)$ $1 last; listen 80; server_name example.com; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:3005/; } location /ruby { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:9051/; } location /_utils { proxy_pass http://127.0.0.1:5984; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_buffering off; # buffering would break CouchDB's _changes feed } gzip on; gzip_comp_level 9; gzip_min_length 1400; gzip_types text/plain text/css image/png image/gif image/jpeg application/x-javascript text/xml application/xml application/x ml+rss text/javascript; gzip_vary on; gzip_http_version 1.1; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; } / and /_utils are working bu /ruby gives me a 403 Forbidden

    Read the article

  • html - selection range - getting the range + starting node + ending node + distance

    - by sugar
    From my previous question for selecting specific html text, I have gone through this link to understand range in html string. Actually I am confused here very much. My question is as follows. For selecting a specific text on html page. We need to follow this steps. assumed html <h4 id="entry1196"><a href="http://radar.oreilly.com/archives/2007/03/call_for_a_blog_1.html" class="external">Call for a Blogger's Code of Conduct</a></h4> <p>Tim O'Reilly calls for a Blogger Code of Conduct. His proposals are:</p> <ol> <li>Take responsibility not just for your own words, but for the comments you allow on your blog.</li> <li>Label your tolerance level for abusive comments.</li> <li>Consider eliminating anonymous comments.</li> </ol> java script to make selection by range var range = document.createRange(); // create range var startPar = [the p node]; // starting parameter var endLi = [the second li node]; // ending parameter range.setStart(startPar,13); // distance from starting parameter. range.setEnd(endLi,17); // distance from ending parameter range.select(); // this statement will make selection I want to do this in invert way. I mean, assume that selection is done by user on browser (safari). My question is that How can we get starting node ( as we have 'the p node' here ) & ending node ( as we have 'the second li node' here ) and the range as well (as we have 13,17 here) ? Please help me. Thanks in advance for sharing your great knowledge. Sagar

    Read the article

  • Solution 6 : Kill a Non-Clustered Process during Two-Node Cluster Failover

    - by StanleyGu
    Using Visual Studio 2008 and C#, I developed a windows service A and deployed it to two nodes of a windows server 2008 failover cluster. The service A is part of the failover cluster service, which means, when failover occurs at node1, the cluster service will failover the windows service A from node 1 to node 2. One of the tasks implemented by the windows service A is to start, monitor or kill a process B. The process B is installed to the two nodes but is not part of the failover cluster service. When a failover occurs at node1, the cluster service does not failover the process B from node 1 to node 2, and the process B continues running at node1. The requirement is: When failover occurs at node1, we want the process B running at node1 gets killed, but we do not want the process B be part of the failover cluster service. The first idea that pops up immediately is to put some code in an event handler triggered by the failover in the windows service A. The failover effect to the windows service A is similar to using the task manager to kill the process of the windows service A, but there is no event in windows service that can be triggered by killing the process of the window service. The events related to terminating a windows service are OnStop and OnShutDown, but killing the process of windows service A triggers neither of them. The OnStop event can only be triggered by stopping the windows service using Services Control Manager or Services Management Console. Apparently, the first idea is not feasible. The second idea that emerges is to put code into the OnStart event handler of the windows service A. When failover occurs at node 1, the windows service A is killed at node 1 and started at node 2. During the starting, the windows service A at node 2 kills the process B that is running at node 1. It is a workaround and works very well. The C# code implementation within the OnStart event handler is as following: 1.       Capture server names of the two nodes from App.config 2.       Determine server name of the remote node. 3.       Kill the process B running on the remote node. Check here for sample code.  

    Read the article

  • drupal_get_form is not passing along node array

    - by ElectronicBlacksmith
    I have not been able to get drupal_get_form to pass on the node data. Code snippets are below. The drupal_get_form documentation (api.drupal.org) states that it will pass on the extra parameters. I am basing the node data not being passed because (apparently) $node['language'] is not defined in hook_form which causes $form['qqq'] not to be created and thus the preview button shows up. My goal here is that the preview button show up using path "node/add/author" but doesn't show up for "milan/author/add". Any alternative methods for achieving this goal would be helpful but the question I want answered is in the preceding paragraph. Everything I've read indicates that it should work. This menu item $items['milan/author/add'] = array( 'title' = 'Add Author', 'page callback' = 'get_author_form', 'access arguments' = array('access content'), 'file' = 'author.pages.inc', ); calls this code function get_author_form() { //return node_form(NULL,NULL); //return drupal_get_form('author_form'); return author_ajax_form('author'); } function author_ajax_form($type) { global $user; module_load_include('inc', 'node', 'node.pages'); $types = node_get_types(); $type = isset($type) ? str_replace('-', '_', $type) : NULL; // If a node type has been specified, validate its existence. if (isset($types[$type]) && node_access('create', $type)) { // Initialize settings: $node = array('uid' = $user-uid, 'name' = (isset($user-name) ? $user-name : ''), 'type' = $type, 'language' = 'bbb','bbb' = 'TRUE'); $output = drupal_get_form($type .'_node_form', $node); } return $output; } And here is the hook_form and hook_form_alter code function author_form_author_node_form_alter(&$form, &$form_state) { $form['author']=NULL; $form['taxonomy']=NULL; $form['options']=NULL; $form['menu']=NULL; $form['comment_settings']=NULL; $form['files']=NULL; $form['revision_information']=NULL; $form['attachments']=NULL; if($form["qqq"]) { $form['buttons']['preview']=NULL; } } function author_form(&$node) { return make_author_form(&$node); } function make_author_form(&$node) { global $user; $type = node_get_types('type', $node); $node = author_make_title($node); drupal_set_breadcrumb(array(l(t('Home'), NULL), l(t($node-title), 'node/' . $node-nid))); $form['authorset'] = array( '#type' = 'fieldset', '#title' = t('Author'), '#weight' = -50, '#collapsible' = FALSE, '#collapsed' = FALSE, ); $form['author_id'] = array( '#access' = user_access('create pd_recluse entries'), '#type' = 'hidden', '#default_value' = $node-author_id, '#weight' = -20 ); $form['authorset']['last_name'] = array( '#type' = 'textfield', '#title' = t('Last Name'), '#maxlength' = 60, '#default_value' = $node-last_name ); $form['authorset']['first_name'] = array( '#type' = 'textfield', '#title' = t('First Name'), '#maxlength' = 60, '#default_value' = $node-first_name ); $form['authorset']['middle_name'] = array( '#type' = 'textfield', '#title' = t('Middle Name'), '#maxlength' = 60, '#default_value' = $node-middle_name ); $form['authorset']['suffix_name'] = array( '#type' = 'textfield', '#title' = t('Suffix Name'), '#maxlength' = 14, '#default_value' = $node-suffix_name ); $form['authorset']['body_filter']['body'] = array( '#access' = user_access('create pd_recluse entries'), '#type' = 'textarea', '#title' = 'Describe Author', '#default_value' = $node-body, '#required' = FALSE, '#weight' = -19 ); $form['status'] = array( '#type' = 'hidden', '#default_value' = '1' ); $form['promote'] = array( '#type' = 'hidden', '#default_value' = '1' ); $form['name'] = array( '#type' = 'hidden', '#default_value' = $user-name ); $form['format'] = array( '#type' = 'hidden', '#default_value' = '1' ); // NOTE in node_example there is some addition code here not needed for this simple node-type $thepath='milan/author'; if($_REQUEST["theletter"]) { $thepath .= "/" . $_REQUEST["theletter"]; } if($node['language']) { $thepath='milan/authorajaxclose'; $form['qqq'] = array( '#type' = 'hidden', '#default_value' = '1' ); } $form['#redirect'] = $thepath; return $form; } That menu path coincides with this theme (PHPTemplate)

    Read the article

  • Requests are making it to my app server, but not into node.js -- why?

    - by Zane Claes
    I detailed in this question on StackOverflow how some random requests are not making it from the client to my Node.js app server, resulting in a gateway timeout. In summary, identical requests are, at random, not even making it far enough to trigger a console.log() in my first line of express middleware. I need to narrow down the problem, though, to find out WHERE the traffic is being lost and it was suggested that I try a packet sniffer on my app servers. Here's my setup: 2x Load Balancers (m1.larges) 2x node.js servers (also m1.large) Here's what's interesting/unusual: the node.js servers started as PHP servers with an Apache stack and continue to serve PHP files for my domain (streamified.me). However, I use a little httpd.conf magic on the app servers so that requests to api.streamified.me get routed over port 8888 to the node.js server: RewriteCond %{HTTP_HOST} ^api.streamified.me RewriteRule ^(.*) http://localhost:8888$1 [P] So, the request hits the load balancer = goes to an app server = gets routed to port 8888 if it's intended for the API = gets handled by node.js So, in the same httpd.conf file, I turned on RewriteLogLevel 5 and then created a simple PHP+CURL script on my localhost to hit my api.streamified.me with a random URL (which should cause node.js to trigger a simple "not found" response) until it resulted in a Gateway timeout. Here, you can see that it has happened -- and the rewrite log shows that the request was definitely received by the app server and forwarded to port 8888... but it was never received by node.js (or, at least, the first line of code in the first line of middleware never gets it...) Image Link: http://i.stack.imgur.com/3OQxS.png

    Read the article

  • Counting leaf nodes in hierarchical tree

    - by timn
    This code fills a tree with values based their depths. But when traversing the tree, I cannot manage to determine the actual number of children. node-cnt is always 0. I've already tried node-parent-cnt but that gives me lots of warnings in Valgrind. Anyway, is the tree type I've chosen even appropriate for my purpose? #include <string.h> #include <stdio.h> #include <stdlib.h> #ifndef NULL #define NULL ((void *) 0) #endif // ---- typedef struct _Tree_Node { // data ptr void *p; // number of nodes int cnt; struct _Tree_Node *nodes; // parent nodes struct _Tree_Node *parent; } Tree_Node; typedef struct { Tree_Node root; } Tree; void Tree_Init(Tree *this) { this->root.p = NULL; this->root.cnt = 0; this->root.nodes = NULL; this->root.parent = NULL; } Tree_Node* Tree_AddNode(Tree_Node *node) { if (node->cnt == 0) { node->nodes = malloc(sizeof(Tree_Node)); } else { node->nodes = realloc( node->nodes, (node->cnt + 1) * sizeof(Tree_Node) ); } Tree_Node *res = &node->nodes[node->cnt]; res->p = NULL; res->cnt = 0; res->nodes = NULL; res->parent = node; node->cnt++; return res; } // ---- void handleNode(Tree_Node *node, int depth) { int j = depth; printf("\n"); while (j--) { printf(" "); } printf("depth=%d ", depth); if (node->p == NULL) { goto out; } printf("value=%s cnt=%d", node->p, node->cnt); out: for (int i = 0; i < node->cnt; i++) { handleNode(&node->nodes[i], depth + 1); } } Tree tree; int curdepth; Tree_Node *curnode; void add(int depth, char *s) { printf("%s: depth (%d) > curdepth (%d): %d\n", s, depth, curdepth, depth > curdepth); if (depth > curdepth) { curnode = Tree_AddNode(curnode); Tree_Node *node = Tree_AddNode(curnode); node->p = malloc(strlen(s)); memcpy(node->p, s, strlen(s)); curdepth++; } else { while (curdepth - depth > 0) { if (curnode->parent == NULL) { printf("Illegal nesting\n"); return; } curnode = curnode->parent; curdepth--; } Tree_Node *node = Tree_AddNode(curnode); node->p = malloc(strlen(s)); memcpy(node->p, s, strlen(s)); } } void main(void) { Tree_Init(&tree); curnode = &tree.root; curdepth = 0; add(0, "1"); add(1, "1.1"); add(2, "1.1.1"); add(3, "1.1.1.1"); add(4, "1.1.1.1.1"); add(2, "1.1.2"); add(0, "2"); handleNode(&tree.root, 0); }

    Read the article

  • alias of nodejs as node on 14.04

    - by Koka
    i installed nodejs with apt-get on 14.04 When i do nodejs -v v0.10.25 and when i do node -v node : command not found. So i want to make alias of nodejs as node So i inserted a line in ~/.bashrc alias node=nodejs Now i can access the nodejs with node on terminal. But in my project, i use grunt which fires nodemon via gruntfile.js. Now nodemon tries to run node instead of nodejs Now again i get the same problem node : command not found. Means alias was not made for non-interactive shell non-login shell. Where should i make the alias for this specific purpose and get my problem solved?

    Read the article

  • Is client side JavaScript capable of ~replicating the Node.JS module loading system?

    - by jt0dd
    I like the Node.JS style of JavaScript, where I can write all of my functionalities into smaller files and then require those neatly from within my code. I'm even thinking about trying to write a framework to mimic that behavior in client-side JS. My goal would be to implement the module loading system as accurately as possible - See Module docs. For require(), I can use things detailed in answers to this question, most notably JQuery's $.getScript(). It seems to me that other aspects of the module loading system should be possible as well. So I'm asking more experienced programmers here first, before I waist my time: Is there something that I'm missing that's going to cause such an attempt to fail miserably, or can this be successfully done?

    Read the article

  • Tips for communication between JS browser game and node.js server?

    - by Petteri Hietavirta
    I am tinkering around with some simple Canvas based cave flyer game and I would like to make it multiplayer eventually. The plan is to use Node.js on the server side. The data sent over would consists of position of each player, direction, velocity and such. The player movements are simple force physics, so I should be able to extrapolate movements before next update from server. Any tips or best practices on the communications side? I guess web sockets are the way to go. Should I send information in every pass of the game loop or with specified intervals? Also, I don't mind if it doesn't work with older browsers.

    Read the article

  • Where does node.js install to?

    - by Ash Scott
    I'm trying to install a script, which is a clone of a game, and uses node.js for it. Now, the documentation says I should copy the node.exe (windows) and put it where the clone is. Now, I can't find the node.exe ubuntu equivalent, I can't even find where it's installed?! Don't really want this hosted on a windows machine due to licensing. Here's a snipet from the doc: Download : Node.js (Install Button) Go where you are install Node.js (For Windows 8 it's C:/Programms/nodejs) Copy node.exe and paste on the clone folder Now I need to do this in ubuntu, however I can't find where node is installed to? Any ideas?

    Read the article

  • Why do node packages put a comma on a newline?

    - by SomeKittens
    I'm learning node.js and am trying out Express. My first app had this code: var express = require('express') , routes = require('./routes') , user = require('./routes/user') , http = require('http') , path = require('path'); Reading through the mongoose tutorial gives me this: var mongoose = require('mongoose') , db = mongoose.createConnection('localhost', 'test'); On strict mode, JSHint gives me app.js: line 6, col 32, Bad line breaking before ','. Which shows that I'm not the only one out there who's bugged by this syntax. Is there any reason to declare vars this way instead of adding the comma at the end of the line?

    Read the article

  • Is client side JavaScript capable of replicating the Node.JS module loading system?

    - by jt0dd
    I like the Node.JS style of JavaScript, where I can write all of my functionalities into smaller files and then require those neatly from within my code. I'm even thinking about trying to write a framework to mimic that behavior in client-side JS. My goal would be to implement the module loading system as accurately as possible - See Module docs. For require(), I can use things detailed in answers to this question, most notably JQuery's $.getScript(). It seems to me that other aspects of the module loading system should be possible as well. So I'm asking more experienced programmers here first, before I waist my time: Is there something that I'm missing that's going to cause such an attempt to fail miserably, or can this be successfully done?

    Read the article

  • What are some ways people deploy relational database changes using Node.js? [closed]

    - by JamesEggers
    I've been diving more and more into Node.js and hosting services like Heroku and Nodejitsu recently and have been trying to figure out how to best deploy database changes for postgres or mysql. There are a few migration projects under npm that I can see; however, all seem to be really buggy or just not work. I currently manage the Monarch migration project on npm, but it's currently buggy itself and my experiences developing such utilities are in other, more procedural, languages. So what do people use to deploy changes to their databases on these environments? What has worked for people? I'm looking for a better understanding of what the current situation/process looks like.

    Read the article

  • Send post request from client to node.js

    - by Husar
    In order to learn node.js I have built a very simple guestbook app. There is basically just a comment form and a list of previous comments. Currently the app is client side only and the items are stored within local storage. What I want to do is send the items to node where I will save them using Mongo DB. The problem is I have not yet found a way to establish a connection to send data back and forth the client and node.js using POST requests. What I do now is add listeners to the request and wait for data I send: request.addListener('data', function(chunk) { console.log("Received POST data chunk '"+ chunk + "'."); }); On the client side I send the data using a simple AJAX request: $.ajax({ url: '/', type: 'post', dataType: 'json', data: 'test' }) This does not work at all in them moment. It could be that I don't know what url to place in the AJAX request 'url' parameter. Or the whole thing might just be the build using the wrong approach. I have also tried implementing the method described here, but also with no success. It would really help if anyone can share some tips on how to make this work (sending POST request from the client side to node and back) or share any good tutorials. thanks.

    Read the article

  • new project app; use entirely node.js

    - by Jared
    I have been looking into Node.js, express and Nowjs and love how easy it is to have real time interactions between clients. My background is mostly from CodeIgniter MVC using PHP and MYSql. I want to re make a current web project of mine from scratch to make everything better and more real time with this newer technology. After researching and doing test examples I want to use node.js , express and Nowjs for the real time interactions once someone connects to the socket.io to pull data back to clients. But use Code Igniter for the control of the site and user management , possible shopping cart/store , pretty much everything else. This is purely due to time constraints and that I am already familiar with doing it that way. I have been looking at MongoDB as an alternative to MySql, Basically the app is going to be multiple chat rooms all on one page. with the ability of notifications and private messaging. Lots of data transfer and images. before I started piecing it together I wanted to get people who have already done something similar. My model would use Code Igniter and MySQL to render the page and then connect them onto a node.js server and broadcast using express and nowjs would using a mongoDB be better than mySQL for tons of messages and data being stored or MYSQL? Also does it make since to not make the whole site on Node.js , kinda piece it together like that?

    Read the article

  • c# XML add an XML node as a child to a particular other node

    - by kacalapy
    I have an XML doc with a structure like this: <Book> <Title title="Door Three"/> <Author name ="Patrick"/> </Book> <Book> <Title title="Light"/> <Author name ="Roger"/> </Book> I want to be able to melodramatically add XML nodes to this XML in a particular place. Lets say I wanted to add a Link node as a child to the author node where the name is Roger. I think it's best if the function containing this logic is passed a param for the name to add an XML node under, please advise and what's the code I need to add XML nodes to a certain place in the XML? Now I am using .AppendChild() method but it doesn't allow for me to specify a parent node to add under...

    Read the article

  • c# Xml ADD A XML NODE AS A CHILD TO A PARTICULAR OTHER NODE

    - by kacalapy
    i have an xml doc with a structure like this: below is supposed to be XML but i dont know how to format it so it will show correct so i used [ ] instead of the typical < [Book] [Title title="Door Three"/] [Author name ="Patrick"/] [/Book] [Book] [Title title="Light"/] [Author name ="Roger"/] [/Book] i want to be able to PROGRAMMATICALY add xml nodes to this xml in a particular place. lets say i wanted to add a Link node as a child to the author node where the name is Roger (or whatever dynamic value is passed in here). i think its best if the function containing this logic is passed a param for the name to add an xml node under, please advise and whats the code i need to add xml nodes to a certain place in the xml? now i am using .AppendChild() method but it doesn't allow for me to specify a parent node to add under... thanks all.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >