Getting started with node.js

Sign in to queue

Description

Benjamin Pasero does a quick walkthrough on how to use node.js and express on your Windows Azure Web Site using Visual Studio Online "Monaco"

Embed

Download

Download this episode

The Discussion

  • User profile image
    ejugnoo

    This is good!

    A new starter on node/express can't see this and work out, since source-code is not provided. How to create that express app on root?

  • User profile image
    egamma

    >How to create that express app on root?
    1) Switch to the git viewlet and clone the following git repository:
    https://github.com/MicrosoftWebMatrix/ExpressStarter.git
    2)Switch to the console and run
    npm install
    3) Select the Run action

  • User profile image
    dagkon

    Where do I find node.d.ts?

    I found it: https://github.com/soywiz/typescript-node-definitions/blob/master/node.d.ts. Bu this is not for the last version of Node. But I don't know if this is a problem.

    /dag

  • User profile image
    egamma

    @dag I suggest to check out the Definitely Typed project. It is a great source for TypeScript type definitions for libraries. Among many others there are type definitions for node, express, etc. Here is the node:
    https://github.com/borisyankov/DefinitelyTyped/tree/master/node

    --erich

  • User profile image
    stevebak

    Is there some documentation on that intellisense in javascript files from *.d.ts files feature? Like can the path to the *.d.ts files be something other than "/.references"? Also, it appears that the definition files need to be direct children of that folder and can't be in subfolders within it.

  • User profile image
    jrieken

    @stevebak: The .references-folder is just a shorthand for not having to include references in all files. Still, you are free to additionally or only use ///-references in your files, e.g. /// <reference path="node.d.ts" />; those paths are always resolved relative to the file they are in.

    Also, please note that with the next release of VSO Monaco we will support _references.ts files, instead of the .references-folder. These files are supposed to have ///-references only and are automatically added as dependency to sibling and descendent files.

  • User profile image
    stevebak

    @jrieken:Thanks! (and sorry for this late reply)

Add Your 2 Cents