file server

overview


Pre-requisites


The davinci web-server depends on two node.js packages, express and body-parser. Install the two packages by entering the following commands in the command prompt from above.


   npm install express
                
create a directory for where you want to host the files that your web-server will serve. Create a directory name "root" in that directory. This folder will be the folder that will hold all the files that you wish to host on the server. Then open a command prompt and navigate to that directory. Next initialize the directory for use with a npm package.

Installation


Next download the the javascript follow at this link. (right click on the link and choose download.) Also download the file.js library file, and place it in the same folder as the file-server.js file.

Make sure you donwload the file to the directory you created above, then in the open command prompt, type:


   node file-server.js
                
This should start the server on your local machine. It will be running on port 2800. To test the server, place some files in the root folder you created. Then open the desktop from the desktop blog component. This requires you to add the davinci provided "data" tab to your workspace. Then open the desktop by clicking the Desktop button. Click connect

Contents