{"_id":"4dstudio-localserver","_rev":"4-2e0b0b0985ec03c1cde5a402ca4a00d5","name":"4dstudio-localserver","description":"This implements the local server for [4dstudio](http://daqri.com/daqri-4d-studio/) by [DAQRI](http://daqri.com). It provide additional features to 4dstudio such as native editor.","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"4dstudio-localserver","version":"0.0.1","scripts":{"start":"node ./bin/www"},"dependencies":{"body-parser":"~1.12.4","cookie-parser":"~1.3.5","debug":"~2.2.0","ejs":"~2.3.1","express":"~4.12.4","morgan":"~1.5.3","serve-favicon":"~2.2.1"},"gitHead":"82e12aacef0064dd13f1edf37958f9753c2bf6ea","description":"This implement the local server for 4dstudio by daqri. It provide additional features to 4dstudio such as  native editor.","_id":"4dstudio-localserver@0.0.1","_shasum":"9ca287f400c20f40abe60803fbe00080e9e8ed03","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.12.3","_npmUser":{"name":"jetienne","email":"jerome.etienne@gmail.com"},"dist":{"shasum":"9ca287f400c20f40abe60803fbe00080e9e8ed03","tarball":"https://registry.npmjs.org/4dstudio-localserver/-/4dstudio-localserver-0.0.1.tgz","integrity":"sha512-eoz1K5jHPJiHYdmLjGvGpB9XA+T4RDqz+HVsCAR7dNPnwSqSkEIBsjy5wmkvlUUT1d2SY3MgRl0IgzY2jKAkWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcCfyl3J0JgAjzwN9LPg8ZOtsxKqUCDS73O6GNqAwU5AIgMSlh+rDPr4fpggeK1AYNcR0eK8UUkgv0FOsoyfYeqZg="}]},"maintainers":[{"name":"jetienne","email":"jerome.etienne@gmail.com"}]},"1.0.0":{"name":"4dstudio-localserver","version":"1.0.0","scripts":{"start":"node ./bin/www"},"bin":{"4dstudio-localserver":"./bin/www"},"dependencies":{"body-parser":"~1.12.4","cookie-parser":"~1.3.5","debug":"~2.2.0","ejs":"~2.3.1","express":"~4.12.4","morgan":"~1.5.3","serve-favicon":"~2.2.1"},"gitHead":"5dd7b1ef17796fd3848d43005c64666f5e71f5c4","description":"This implements the local server for [4dstudio](http://daqri.com/daqri-4d-studio/) by [DAQRI](http://daqri.com). It provide additional features to 4dstudio such as native editor.","_id":"4dstudio-localserver@1.0.0","_shasum":"d4800135ff34210db67490c9dedbadb4bb03c58e","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.12.3","_npmUser":{"name":"jetienne","email":"jerome.etienne@gmail.com"},"dist":{"shasum":"d4800135ff34210db67490c9dedbadb4bb03c58e","tarball":"https://registry.npmjs.org/4dstudio-localserver/-/4dstudio-localserver-1.0.0.tgz","integrity":"sha512-uF8CdW8qf+0ksEKsmF7O76RN18aItQrg3MaP99SQwMyc/x+vQ5zYqCw0uXz3rl9OeZW4tpZm412i/uoMuWvByA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDl7mQ+/W3CZDIaB4yLZKy5rer4n48QrQO7yi+1A0VECAiB3zkW7OpaCc3SRcT5/rOmUI5s5BWeJUpMIaj4RecKuQg=="}]},"maintainers":[{"name":"jetienne","email":"jerome.etienne@gmail.com"}]}},"readme":"# 4dstudio-localserver\n\nThis implements the local server for [4dstudio](http://daqri.com/daqri-4d-studio/) by [DAQRI](http://daqri.com).\nIt provide additional features to 4dstudio such as native editor.\n\nNative editor allow you to edit scripts with a native \neditor (e.g. [sublime text](http://www.sublimetext.com/)). \nIt is likely more confortable than editing within the browser.\nIt is intended to power user and has to be run on the user computer.\nPlease note that it is optional and not at all required to use 4dStudio.\n\nhere is native editor feature in actions.\n\n![nativeeditor2](https://cloud.githubusercontent.com/assets/252962/9174704/780123d2-3f79-11e5-8958-4ae67dfbe211.gif)\n\n## Getting Started\n\nIt is published on npm as usual. So you first install it\n\n```\n$ npm install -g 4dstudio-localserver\n```\n\nAnd then launch it via \n\n```\n$ 4dstudio-localserver\n```\n\nTo tune your own editor, you need to have a blocking command line to launch it.\nPass it to the server via ```EDITOR_4DSTUDIO``` environment variables.\n\n* For [atom](http://atom.io), use ```export $EDITOR_4DSTUDIO='atom --wait'```.\n* For [sublime text](http://www.sublimetext.com/), use ```export $EDITOR_4DSTUDIO='subl --wait --new-window'```\n\nYou are free to define it for the editor you like.\n\n---\n\n\n## How to install from git\n\nYou simply clone the repository \n\n```\ngit clone https://github.com/DAQRI/4dstudio-localserver.git\n```\n\nGo in the directory, and start the server on your computer with \n\n```\nnpm start\n```\n\n\n## Internal Workflow\nHere are the step followed when 4dstudio is using native editor in 4dstudio-localserver\n\n1. User click on 'native editor' button above the js editor in 4dstudio\n2. 4dstudio webpage get the content of the codemirror content via javascript\n3. 4dstudio contacts the local server with this content from codemirror, and a fake basename. \n   - This basename will be used to create a temporary file, which will be passed to the editor itself.\n   - Thus the user get a expected name (e.g. script.js)\n   - Based on the file extensions, the editor will provide contextual help, code colorisation, autocompletion etc...\n4. When the text is saved, the local server get the content of the provided files, and reply that to 4dstudio\n5. On reception of the new content, 4dstudio update the proper codemirror instance with the new content\n\n## Implementation Details\n- the server will bind the port 5000 on 127.0.0.1\n- it is implemented as a [express server](http://expressjs.com/) in [node.js](https://nodejs.org)\n","maintainers":[{"name":"jetienne","email":"jerome.etienne@gmail.com"}],"time":{"modified":"2022-06-12T14:07:48.331Z","created":"2015-07-22T14:07:42.821Z","0.0.1":"2015-07-22T14:07:42.821Z","1.0.0":"2015-08-10T15:19:55.384Z"},"readmeFilename":"README.md"}