Stream remote service logs in Visual Studio Code. View (tail) any output that the running app generates through calls to console.log. This output appears in the Output window in Visual Studio Code. In the Azure App Service explorer, right-click the app node and choose Start Streaming Logs.
This is an extension meant to give you some awesome NodeJS snippets
Node Visual Studio Code
️ Simple extension for Visual Studio Code that allows you to quickly delete your project's nodemodules directory. Search Node Modules. Use searchNodeModules command to search nodemodules folder. Select the nodemodules folder; Right click; Select Delete Node Modules item; Then, all contents in the nodemodules folder will be cleared. Browse other questions tagged node.js nodemon visual-studio-code or ask your own question. The Overflow Blog Podcast 332: Non-fungible Talking. The Loop: Our Community & Public Platform Roadmap for Q2 2021. Featured on Meta Stack Overflow for Teams is now free for up to 50 users, forever. If you are a beginner, trying Node.js for the first time, we recommend installing directly on Windows. For more information, see Should I install Node.js on Windows or Windows Subsystem for Linux. Try NodeJS with Visual Studio Code. If you have not yet installed Visual Studio Code, return to the prerequisite section above and follow the. A alternative solution I've found is to simply launch code from the shell after you pick your node using nvm. You need to first open the command pallet and select 'install 'code' into path'. And then launch a terminal and select your node via nvm and then launch 'code'.
## Contact
Node Js Visual Studio Code Extension
If you find issues please report them on the GitHub repo.
If you have any comments like feature requests or feedback on theses snippets please contact me on Twitter at chris_noring.
Remember these snippets are for all of you, so if you feel that they could be even better, don't hesitate to let me know :)
/Chris
Features
Visual Studio Code Node Debug
A collection of NodeJS snippets
The following commands are available:
node-express
, creates an express servernode-express-get
, creates GET routenode-express-get-params
, creates a GET route and shows how to access parametersnode-express-post
, creates a POST routenode-express-post-params
, creates a POST route and shows how to access the bodynode-express-post-params-alt
, creates a POST route, shows how to access the body, works for express 4.16 and abovenode-express-put-params
, creates a PUT route, shows how to access body.node-express-delete-params
, creates a DELETE route, shows how to access route parameter. How to add photo in word.node-express-query-params
, creates a POST route, shows how to access query parameters.node-express-middleware-logger
, creates an example middlewarenode-express-middleware-error
, creates an error handling middleware Dockerfile install docker.node-http-server
, creates a simple HTTP servernode-file-read-sync
, reads a file synchronouslynode-file-read-async
, reads a file asynchronously, with a callbackSee full list on mkvtoolnix.download.
node-event-emitter
, creates an event emitter, emit events and shows to subscribe to said eventnode-promise-create
, creates a Promisenode-promise-shorthand
, creates a Promises using the static methodsresolve()
andreject()
node-promise-all
, resolves a list of Promises using thePromise.all([])
methodnode-async-await
, using async/awaitnode-express-schema-validation
, adding schema validation for express, read more about the usage of schema validation withJoi
at https://github.com/hapijs/joinode-regex-test-digits
, invokes thetest()
method that tests whether a string matches a regular expression on digits.node-regex-test-word
, invokes thetest()
method that tests whether a string matches a regular expression on word boundaries.node-regex-match
, invokes the methodmatch()
on a regular expression to find a file extensionnode-regex-match-named-group
, invokes the methodmatch()
on a regular expression and place it in a group calledexteension
.node-http-quark
, creates a HTTP app using the framework quarkhttp,node-http-quark-get
, adds a GET route to your quarkhttp appnode-http-quark-post
, adds a POST route to your quarkhttp appnode-http-quark-put
, adds a PUT route to your quarkhttp appnode-http-quark-middleware
, adds a middleware to your quarkhttp appnode-jest-suite
, adds a test suitenode-jest-test
, adds a testnode-jest-test-expect
, adds a test with an expectnode-jest-expect
, adds an expect, usingtoBe()
node-jest-expect-to-equal
, adds expect, usingtoEqual()
node-jest-test-expect-to-equal
, adds a test with an expect, usingtoEqual()
node-jest-expect-to-throw
, adds an expect, usingtoThrow()
node-jest-test-expect-to-throw
, adds a test with an expect, usingtoThrow()
,node-jest-test-beforeAll
, adds abeforeAll()
, this method runs before all testsnode-jest-test-afterAll
, adds aafterAll()
, this method runs after all testsnode-supertest-init
, adds the initial imports for supertest and the app you are about to test. I assume the app you are about to test looks something like this:and that your file structure looks like this:
node-supertest-beforeall
, configures supertest to use the app instance, this is a needed step to initialize supertestnode-supertest-aftereall
, ensures the web app closes down after the test run, this is a needed step.node-supertest-testget
, an example of supertest testing a GET routenode-supertest-testgetwithparam
, an example of supertest testing a GET route with a route parameternode-supertest-testpost
, an example of supertest testing a POST route with a payload
Release Notes
This is the release notes.
1.3.2
Adding typescript support. Thank you to @DrQubit for the suggestion
1.2.1
Adding supertest so you can easily test your API. Assumes using Express as web framework.
1.1.0
Adding Jest snippets and snippets for a micro HTTP framework, quarkhttp (can be installed from NPM)
0.0.5
correcting the docs
0.0.4
adding schema validation with the lib Joi
0.0.3
added promises and async
0.0.2
added repo and icon
0.0.1
some initial commands for express library but also things like http
, file access and using event-emitter
Publisher
Chris Noring@chris_noring