Hosts current workspace with Express web server in Visual Studio Code
To host your current workspace in Express with default port number (80), and then open in your default browser.
- Bring up Command Palette (
Ctrl+Shift+P on Windows and Linux, or
Shift+CMD+P on OSX)
- Type or select "Express: Host current workspace and open in browser"
When Express is up and ready, an icon will show up in the status bar . You can click on it to open your site in browser.
|Express: Host Current Workspace
|Express: Host Current Workspace and Open in Browser
|Express: Host Current Workspace with Random Port Number
|Express: Host Current Workspace with Random Port Number and open in browser
|Express: Open Currently Hosted Website in Browser
|Express: Show Output
|Express: Stop Server
By default, the Express server is hosted on port 80. You can configure it to different port in preferences.
// Specifies the port number the Express server should listen to
// Determines whether to omit informational messages
// Specifies the path to be hosted on Express, relative to the workspace root
// Specifies the minimum port number to use for random port number
// Specifies the maximum port number to use for random port number
// Determines whether to show output on server start
Tips: Settings can be shared across team when overridden by workspace settings and checked into source control.
- 0.0.5 (2016-05-31)
- Feature: Force close active connections on shutdown
- 0.0.4 (2016-03-24): Update extension description
- 0.0.3 (2016-03-16)
- Show every request in output when server start
- 0.0.2 (2016-03-16)
- Support both pre-configured or random port number
vscode.commands.executeCommand('express.hostWorkspace', 8080) to host on port 8080
- Automatically stop server when extension is being deactivated
- 0.0.1 (2016-03-14): First public release
Love this extension? Star us!
Want to make this extension even more awesome? Send us your wish.
Hate how it is working? File an issue to us.