GithubHelp home page GithubHelp logo

jas-chen / atom-live-server Goto Github PK

View Code? Open in Web Editor NEW
121.0 14.0 48.0 1.15 MB

Launch a simple development http server with live reload capability.

Home Page: https://atom.io/packages/atom-live-server

License: MIT License

JavaScript 97.07% CSS 2.93%

atom-live-server's Introduction

atom-live-server package

Launch a simple development http server with live reload capability.

Demo

This package is based on awesome Live Server project.

Usage

Command Keybinding Description
atom-live-server:start-server ctrl-alt-l Launch live server on default port, by default 3000.
atom-live-server:stop-server ctrl-alt-q Stops currently running instance of live server.
atom-live-server:start-3000 ctrl-alt-3 Launch live server on port 3000.
atom-live-server:start-4000 ctrl-alt-4 Launch live server on port 4000.
atom-live-server:start-5000 ctrl-alt-5 Launch live server on port 5000.
atom-live-server:start-8000 ctrl-alt-8 Launch live server on port 8000.
atom-live-server:start-9000 ctrl-alt-9 Launch live server on port 9000.

Options

If a file .atom-live-server.json exists in project root it will be loaded and used as options.

The keys of .atom-live-server.json should match Command line parameters in live-server.

Example: Launch specific browser

{
  "browser": "safari"
}

Example: Start server without browser opened

{
  "no-browser": true
}

Example: Serve this file for every 404 (useful for single-page applications)

{
  "entry-file": "index.html"
}

Example: Serve this directory as root path

{
  "root": "public"
}

atom-live-server's People

Contributors

bfkss avatar boulabiar avatar jas-chen avatar richiksc avatar ryanwarsaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-live-server's Issues

live-server continuously automatically updates

Latest version works great, but seems to auto update every 15 secs or so?

When I'm developing an app requires working through and debugging in the browser/UI, I only want it to update when a file changes have been saved. This is the intent?

Making changes in CSS file is not reflected in web browser

Hi,

Everything was working perfect ,but most of the times the changes made in CSS file is not reflecting in the browser after saving. But when the HTML file is saved again ,the changes are reflected. This problem is inconsistent .

Live reload not working

Atom 1.14.3 atom-live-server 2.1.1

The server starts, but it doesnt live reload any more?

No Refresh on Save

I'm not getting refresh on save behaviour.
Please advise how to test.

Ignore and watch parameters don't seem to work

Hi,

I tried to disable live reload for SVG files by adding a .atom-live-server.json file but I can't get it working...
My file is working because I changed the host successfully. I also did a restart of the server after having edited the json file.

Here is my file:

{
    "host": "liarbustr.com",
    "ignore": "**/*.svg",
    "watch": "index.html"
}

I also tried to wrap ignore and watch values in an array, but without any effect.

With ignore and/or watch, I still have this result in my browser:

<svg xmlns="http://www.w3.org/2000/svg" class="svg-master"><!-- Code injected by live-server -->
<script type="text/javascript">
	// <![CDATA[  <-- For SVG support
	if ('WebSocket' in window) {
		(function() {
			function refreshCSS() {
				var sheets = [].slice.call(document.getElementsByTagName("link"));
				var head = document.getElementsByTagName("head")[0];
				for (var i = 0; i < sheets.length; ++i) {
					var elem = sheets[i];
					head.removeChild(elem);
					var rel = elem.rel;
					if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") {
						var url = elem.href.replace(/(&|\?)_cacheOverride=\d+/, '');
						elem.href = url + (url.indexOf('?') >= 0 ? '&' : '?') + '_cacheOverride=' + (new Date().valueOf());
					}
					head.appendChild(elem);
				}
			}
			var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://';
			var address = protocol + window.location.host + window.location.pathname + '/ws';
			var socket = new WebSocket(address);
			socket.onmessage = function(msg) {
				if (msg.data == 'reload') window.location.reload();
				else if (msg.data == 'refreshcss') refreshCSS();
			};
			console.log('Live reload enabled.');
		})();
	}
	// ]]>
</script>
</svg>

Thanks for your help!

How mac work?

How do i start up the server?
I try to use command+shift+8
but it didn't work

--Thank you--

Failed to load the atom-live-server package

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.14.1 x64
Electron: 1.3.13
OS: Mac OS X 10.12.3
Thrown From: atom-live-server package 2.1.0

Stack Trace

Failed to load the atom-live-server package

At Cannot find module 'json5'

Error: Cannot find module 'json5'
    at Module._resolveFilename (module.js:455:15)
    at Module._resolveFilename (/Applications/Atom.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._resolveFilename (/app.asar/src/module-cache.js:383:52)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (/app.asar/src/native-compile-cache.js:50:27)
    at /packages/atom-live-server/lib/atom-live-server.js:7:34)
    at Module._compile (/app.asar/src/native-compile-cache.js:109:30)
    at /app.asar/src/compile-cache.js:216:21)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (/app.asar/src/native-compile-cache.js:50:27)
    at Package.module.exports.Package.requireMainModule (/app.asar/src/package.js:796:27)
    at /app.asar/src/package.js:123:28
    at Package.module.exports.Package.measure (/app.asar/src/package.js:96:15)
    at Package.module.exports.Package.load (/app.asar/src/package.js:110:12)
    at PackageManager.module.exports.PackageManager.loadPackage (/app.asar/src/package-manager.js:468:14)
    at /app.asar/src/package-manager.js:412:19
    at Config.module.exports.Config.transact (/app.asar/src/config.js:312:16)
    at PackageManager.module.exports.PackageManager.loadPackages (/app.asar/src/package-manager.js:407:19)
    at /app.asar/src/atom-environment.js:794:28

Commands

     -0:06.3.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)

Non-Core Packages

atom-apex-snippets 0.3.3 
atom-beautify 0.29.17 
atom-bugs 0.24.0 
atom-clock 0.1.3 
atom-java-snippets 0.5.1 
atom-json-color 0.6.0 
atom-like-brackets-editor 1.1.4 
atom-live-server 2.1.0 
atom-mysql-snippets 0.3.1 
atom-python-snippets 0.0.0 
atom-trello 0.7.1 
atom-wrap-in-tag 0.6.0 
atomizr 0.23.0 
audio 1.5.7 
auto-id-class 0.2.6 
autoclose-html 0.23.0 
autocomplete-emojis 2.5.0 
autocomplete-html-entities 0.1.0 
autocomplete-json 5.2.0 
autocomplete-lodash 0.2.3 
autocomplete-paths 1.0.5 
autocomplete-python 1.8.52 
autoupdate-packages 1.3.1 
battery-status 0.11.1 
browse 1.4.1 
browser-plus 0.0.87 
clipboard-autocomplete 0.4.0 
css-specificity 0.2.2 
dash 1.7.0 
docblockr 0.9.1 
double-tag 0.4.0 
edit-in-new-tab 0.9.0 
editorconfig 2.2.1 
emmet 2.4.3 
es6-javascript 1.0.0 
file-explorer 0.3.0 
file-icons 2.0.15 
file-watcher 1.0.2 
filesize 2.0.4 
gist 0.3.1 
git-clone 0.2.0 
git-log 0.4.1 
git-plus 7.2.2 
git-time-machine 1.5.6 
gitkraken 0.4.2 
highlight-column 0.5.2 
highlight-line 0.12.0 
highlight-selected 0.12.0 
Hydrogen 1.5.5 
jumpy 3.1.3 
kite 0.8.9 
language-babel 2.54.1 
language-gitignore 0.3.0 
linter 1.11.23 
linter-csslint 1.3.3 
linter-eslint 8.1.1 
linter-javac 1.9.4 
linter-jsonlint 1.3.0 
linter-pylama 0.8.13 
linter-sass-lint 1.7.4 
linter-shellcheck 1.4.3 
local-history 4.0.1 
mac-fix-path 0.0.0 
MavensMate-Atom 1.0.10 
maybs-quit 1.3.0 
minimap 4.26.8 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.1 
minimap-git-diff 4.3.1 
minimap-highlight-selected 4.5.0 
minimap-selection 4.4.0 
open-in-browser 0.4.7 
outline-selection 0.3.1 
package-manager-commands 2.0.3 
package-settings 1.1.0 
pane-layout-plus 0.7.3 
pane-move-plus 0.3.1 
pigments 0.39.0 
platformio-ide-terminal 2.2.3 
script 3.14.1 
set-syntax 0.3.2 
sort-lines 0.14.0 
split-diff 1.1.4 
Sublime-Style-Column-Selection 1.7.3 
svg-preview 0.11.0 
swackets 0.26.0 
symbol-gen 1.3.1 
sync-settings 0.8.1 
tag 0.4.0 
tree-view-autoresize 1.5.0 
tree-view-extended 1.0.0 
tree-view-git-status 1.3.0 
tree-view-search-bar 0.1.3 
web-accessibility-checker 0.1.4 
Zen 0.16.4 

How to stop running live server ?

Hi, its kind of query cum issue I can say. Question is, How are we suppose to shut down the running live server ? For e.g. If I press Ctr+Shift+3 and it will run the app on port 3000. then if I close the browser / tab and again trying to run the same application on port 3000, its not working. its opening on some random ports. So there is two server running on different port. Any thought ?

How to ignore some files ?

Hi,

I want to be able to tell live-server to ignore some files modification for the live-reload feature.
Is that possible ? If so how ? If not, can this come in a next release ?

I'm using this with typescript projet, so I want to ignore file changes on .ts and instead listen to the change on the compiled .js

Uncaught TypeError: this.emit is not a function

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.7.0-beta4
System: Microsoft Windows 10 Pro
Thrown From: atom-live-server package, v1.2.5

Stack Trace

Uncaught TypeError: this.emit is not a function

At C:\Users\cross\.atom\packages\atom-live-server\live-server\node_modules\watchr\out\lib\watchr.js:355

TypeError: this.emit is not a function
    at C:\Users\cross\.atom\packages\atom-live-server\live-server\node_modules\watchr\out\lib\watchr.js:355:27
    at C:\Users\cross\.atom\packages\atom-live-server\live-server\node_modules\watchr\node_modules\bal-util\node_modules\safefs\out\lib\safefs.js:154:16
    at FSReqWrap.oncomplete (fs.js:82:15)

Commands

     -9:27.7.0 remote-ftp:create-ftp-config (atom-workspace.workspace.scrollbars-visible-always.seti-ui-no-icons.theme-atom-dark-syntax.theme-atom-dark-ui)
     -9:20.1.0 core:save (atom-text-editor.editor.is-focused)
     -9:10.6.0 atom-live-server:start-3000 (atom-text-editor.editor.is-focused)
     -8:35 core:save (atom-text-editor.editor.is-focused)
     -8:30.2.0 settings-view:open (atom-text-editor.editor.is-focused)
     -8:12.5.0 core:save (atom-text-editor.editor.is-focused)
     -8:11 core:undo (atom-text-editor.editor.is-focused)
     -8:10.7.0 core:save (atom-text-editor.editor.is-focused)
     -8:01.3.0 tree-view:remove (span.name.icon.icon-file-directory)
     -2:31.6.0 atom-terminal-panel:open-config (atom-workspace.workspace.scrollbars-visible-always.seti-ui-no-icons.theme-atom-dark-syntax.theme-atom-dark-ui)
     -2:10.8.0 editor:toggle-soft-wrap (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "command-palette",
      "preview-plus",
      "Remote-FTP"
    ],
    "packagesWithKeymapsDisabled": [
      "atom-terminal-panel"
    ],
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  }
}

Installed Packages

# User
atom-html-preview, v0.1.19
atom-live-server, v1.2.5
atom-terminal-panel, v4.4.4
browser-refresh, v0.9.0
file-icons, v1.6.20

# Dev
No dev packages

Failed to activate the atom-live-server package

Hi,
I've installed the package and this error appeared when I tried to start the server.

Atom Version: 1.2.0
System: Windows 7
Thrown From: atom-live-server package, v1.2.3

Stack Trace

Failed to activate the atom-live-server package

At callSite.getFileName is not a function

TypeError: callSite.getFileName is not a function
    at callSiteLocation (C:\Users\Ratik\.atom\packages\atom-live-server\live-server\node_modules\connect\node_modules\depd\index.js:260:23)
    at depd (C:\Users\Ratik\.atom\packages\atom-live-server\live-server\node_modules\connect\node_modules\depd\index.js:120:14)
    at Object.<anonymous> (C:\Users\Ratik\.atom\packages\atom-live-server\live-server\node_modules\connect\lib\connect.js:12:32)
    at Module._compile (module.js:434:26)
    at Object.defineProperty.value [as .js] (C:\Users\Ratik\AppData\Local\atom\app-1.2.0\resources\app.asar\src\compile-cache.js:190:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Users\Ratik\.atom\packages\atom-live-server\live-server\node_modules\connect\index.js:2:18)
    at Module._compile (module.js:434:26)
    at Object.defineProperty.value [as .js] (C:\Users\Ratik\AppData\Local\atom\app-1.2.0\resources\app.asar\src\compile-cache.js:190:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

Commands

     -0:08.5.0 atom-live-server:start-3000 (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)

Config

{
  "core": {}
}

Installed Packages

# User
atom-live-server, v1.2.3
node-debugger, v1.1.9

# Dev
No dev packages

Uncaught Error: EPERM: operation not permitted, write

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.19
System: Microsoft Windows 8.1 Pro
Thrown From: atom-live-server package, v1.2.0

Stack Trace

Uncaught Error: EPERM: operation not permitted, write

At fs.js:663

Error: EPERM: operation not permitted, write
  at Error (native)
  at Object.fs.writeSync (fs.js:663:20)
  at SyncWriteStream.write (fs.js:1932:6)
  at Array.logRequest (C:\Users\RMatos\.atom\packages\atom-live-server\live-server\node_modules\connect\node_modules\morgan\index.js:132:14)
  at listener (C:\Users\RMatos\.atom\packages\atom-live-server\live-server\node_modules\connect\node_modules\morgan\node_modules\on-finished\index.js:169:15)
  at onFinish (C:\Users\RMatos\.atom\packages\atom-live-server\live-server\node_modules\connect\node_modules\morgan\node_modules\on-finished\index.js:100:5)
  at callback (C:\Users\RMatos\.atom\packages\atom-live-server\live-server\node_modules\connect\node_modules\morgan\node_modules\on-finished\node_modules\ee-first\index.js:55:10)
  at ServerResponse.onevent (C:\Users\RMatos\.atom\packages\atom-live-server\live-server\node_modules\connect\node_modules\morgan\node_modules\on-finished\node_modules\ee-first\index.js:93:5)
  at emitNone (events.js:67:13)
  at ServerResponse.emit (events.js:166:7)
  at finish (_http_outgoing.js:525:10)
  at doNTCallback0 (node.js:416:9)
  at process._tickCallback (node.js:345:13)

Commands

     -7:06.8.0 welcome:show (atom-text-editor.editor.is-focused)
     -5:35.3.0 core:paste (atom-text-editor.editor.mini.is-focused)
  2x -5:32.4.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -5:30.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:53 core:backspace (atom-text-editor.editor.is-focused)
     -2:52.1.0 editor:auto-indent (atom-text-editor.editor.is-focused)
  5x -2:46.5.0 pane:show-next-item (atom-text-editor.editor.is-focused)
  2x -2:27.5.0 core:backspace (atom-text-editor.editor.is-focused)
     -2:25.1.0 core:save (atom-text-editor.editor.is-focused)
     -2:22.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -2:21.8.0 editor:auto-indent (atom-text-editor.editor.is-focused)
     -2:04.1.0 atom-live-server:start-3000 (ul.list-inline.tab-bar.inset-panel)
  2x -1:03.6.0 core:undo (atom-text-editor.editor.is-focused)
     -0:56.8.0 atom-live-server:start-3000 (atom-text-editor.editor.is-focused)
     -0:17.2.0 atom-live-server:start-9000 (atom-text-editor.editor.is-focused)
     -0:05.9.0 atom-live-server:start-3000 (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "base16-tomorrow-dark-theme"
    ]
  }
}

Installed Packages

# User
atom-live-server, v1.2.0

# Dev
No dev packages

Doesn't load at automatically

Doesn't work until I uninstall and reinstall every time i reopen atom.

I'm using it on windows 10 and the version is 1.2.5

Can't install the package

Hello
I can't install the package
I am getting this error
operating system : windows 10

Installing โ€œ[email protected]โ€ failed

npm WARN excluding symbolic link live-server\node_modules.bin\watchr -> ../watchr/bin/watchr
npm WARN excluding symbolic link live-server\node_modules\send\node_modules.bin\mime -> ../mime/cli.js
npm WARN excluding symbolic link live-server\node_modules.bin\watchr -> ../watchr/bin/watchr
npm WARN excluding symbolic link live-server\node_modules\send\node_modules.bin\mime -> ../mime/cli.js
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\Users\Mohsen\AppData\Local\atom\app-1.8.0\resources\app\apm\bin\node.exe" "C:\Users\Mohsen\AppData\Local\atom\app-1.8.0\resources\app\apm\node_modules\npm\bin\npm-cli.js" "--globalconfig" "C:\Users\Mohsen.atom.apm.apmrc" "--userconfig" "C:\Users\Mohsen.atom.apmrc" "install" "C:\Users\Mohsen\AppData\Local\Temp\d-11668-788-wg4rsl\package.tgz" "--target=0.36.8" "--arch=ia32" "--msvs_version=2013"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! file C:\Users\Mohsen.atom.apm\bal-util\1.18.0\package\package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Unexpected token '\u0000' at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: C:\Users\Mohsen.atom.apm\bal-util\1.18.0\package\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

Browser Launch

For our students we currently block access to cmd.exe via group policy, would this stop the browser from launching?

A question

First of all: thank you a lot for the package! Very useful one ๐Ÿ‘

I can run server by shortcuts, but how can we set OFF the server/servers?
How much memory each server consuming?

Is the server only unload when I close Atom-editor completely?

Failed to load the atom-live-server package

[Enter steps to reproduce below:]

  1. Updating from v 1.5.0
  2. Tried un-install/re-install but same error

Atom Version: 1.5.0
System: Mac OS X 10.12.3
Thrown From: atom-live-server package, v2.1.1

Stack Trace

Failed to load the atom-live-server package

At Cannot find module 'electron'

Error: Cannot find module 'electron'
    at Module._resolveFilename (module.js:336:15)
    at Function.Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/Wolfe/.atom/packages/atom-live-server/lib/atom-live-server.js:6:60)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:722:27)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:117:28
    at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:92:15)
    at Package.module.exports.Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:106:12)
    at PackageManager.module.exports.PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:445:14)
    at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:524:30)
    at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:444:29
    at exit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:73:16)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:220:18
    at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:98:18)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

Commands

     -4:28.8.0 core:close (atom-text-editor.editor.is-focused)
     -1:24.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
atom-commander, v0.8.6
atom-live-server, v2.1.1
autoclose-html, v0.23.0
javascript-snippets, v1.2.1
open-in-browser, v0.4.7
pigments, v0.33.1

# Dev
No dev packages

#live preview of css and html is not working

atom-live server package runs on internet but its not working propely.Like files are opening but its not giving live output as edited in the text-editor.
Please can someone explain in brief that ports are not working and css live preview is not working.

ctrl-shift-3 launch live server on port 3000.

ctrl-shift-4 launch live server on port 4000.

ctrl-shift-5 launch live server on port 5000.

ctrl-shift-8 launch live server on port 8000.

ctrl-shift-9 launch live server on port 9000.

refresh on save not working

Everything has been working as expected. But suddenly the browser is not refreshing when changes are made to my html. I've tried on different ports. No luck.

Live server creates blank page.

Whenever I start the server a blank page shows up with the title "ip.ip.ip.ip:3000" and no files to select to load into the live server.
Windows 10 64x
Node.js Installed

Failed to activate the atom-live-server package

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.3.2
System: Unknown Windows Version
Thrown From: atom-live-server package, v1.2.5

Stack Trace

Failed to activate the atom-live-server package

At Cannot find module 'loophole'

Error: Cannot find module 'loophole'
    at Module._resolveFilename (module.js:336:15)
    at Function.Module._resolveFilename (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\module-cache.js:383:52)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\native-compile-cache.js:50:27)
    at Object.<anonymous> (file:///C:/Users/User/.atom/packages/atom-live-server-master/lib/atom-live-server.coffee:2:21)
    at Object.<anonymous> (file:///C:/Users/User/.atom/packages/atom-live-server-master/lib/atom-live-server.coffee:1:1)
    at Module._compile (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .coffee] (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\native-compile-cache.js:50:27)
    at Package.module.exports.Package.requireMainModule (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\package.js:663:34)
    at Package.module.exports.Package.activateConfig (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\package.js:188:14)
    at Package.module.exports.Package.activateNow (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\package.js:166:14)
    at C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\package.js:740:25
    at Emitter.module.exports.Emitter.emit (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\command-registry.js:241:20)
    at CommandRegistry.handleCommandEvent (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\User\AppData\Local\atom\app-1.3.2\resources\app.asar\src\atom-environment.js:1010:28)
    at emitOne (events.js:77:13)
    at EventEmitter.emit (events.js:169:7)

Commands

     -0:02.4.0 atom-live-server:start-8000 (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "browser-plus",
      "color-picker"
    ]
  }
}

Installed Packages

# User
minimap, v4.18.2

# Dev
No dev packages

Remove console.log('Live reload enabled.');

Hi,
Thank you for the package, but please remove the console.log('Live reload enabled.'); code. I'm using dev tool a lot and I feel a bit weird to see that words while I'm debugging my code.

Thank you.

Uncaught SyntaxError: Unexpected EOF at line 1 column 2 of the JSON5 data. Still to read: ""

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.15.0 x64
Electron: 1.3.13
OS: Mac OS X 10.12.3
Thrown From: atom-live-server package 2.1.2

Stack Trace

Uncaught SyntaxError: Unexpected EOF at line 1 column 2 of the JSON5 data. Still to read: ""

At /Users/PaulDrozdFair/.atom/packages/atom-live-server/node_modules/json5/lib/json5.js:64

SyntaxError: Unexpected EOF at line 1 column 2 of the JSON5 data. Still to read: ""
    at error (/packages/atom-live-server/node_modules/json5/lib/json5.js:56:25)
    at word (/packages/atom-live-server/node_modules/json5/lib/json5.js:393:13)
    at value (/packages/atom-live-server/node_modules/json5/lib/json5.js:493:56)
    at Object.parse (/packages/atom-live-server/node_modules/json5/lib/json5.js:508:18)
    at /packages/atom-live-server/lib/atom-live-server.js:106:34
    at /packages/atom-live-server/lib/atom-live-server.js:121:12
    at FSReqWrap.oncomplete (fs.js:123:15)

Commands

     -2:21.6.0 dev-live-reload:reload-all (input.hidden-input)
  3x -1:53.2.0 atom-live-server:start-9000 (input.hidden-input)
     -1:30.2.0 atom-live-server:start-8000 (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -1:26.3.0 atom-live-server:start-4000 (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -1:23.3.0 atom-live-server:start-3000 (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:41.7.0 atom-live-server:stopServer (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:27.1.0 atom-live-server:startServer (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)

Non-Core Packages

atom-beautify 0.29.17 
atom-bootstrap4 1.4.0 
atom-html-preview 0.1.22 
atom-live-server 2.1.2 
color-picker 2.2.5 
emmet 2.4.3 
git-plus 7.3.3 
gulp-control 0.5.0 
metro-ui 2.2.2 
minimap 4.27.0 
Remote-FTP 0.10.7 
sass-autocompile 0.13.3 

Live Reload not working

I've just updated Atom to version 1.11.2 and atom-live-server to 1.2.5 both on Windows and Linux.
Whenever I save an HTML or CSS file the page won't refresh itself anymore nor the console.log stating that Live Reload is up and running shows up.

Stopped working after update 2.1.2

I have tried these two suggestions and neither works, was functioning prior to 2.1.2 update and as soon as updated it stopped functioning I have tried reinstalling as well as restarting.

If you have a problem launching a live-server, please try following steps:

  1. Make sure you use the right hotkeys. After v2.0.0, the keys became ctrl-alt combination.
  2. Try launching live-server from top menu: Package -> live-server -> Start Server to see if it works.

file encodeing error

i save to euc-kr.
local server character is okay.
but use live-server in atom. webpage characters break

Wrong file is shown in browser

Hi,
after I start a liveserver it open some I don't know folder :) but not the file I have opened in Atom.
What do I'm wrong?

Cheers

Not creating a server

When ever i press the shortcut keys for creating a Live Server(ctrl+shift+3), it does create any server

PHP files dont work

I was wondering how I might be able to load PHP files because when I click them it just downloads, it doesn't open.

Can not override key configuration

If I start the Server via: Package -> live-server -> Start Server it does work as I am used to it. However after the recent update the Hotkeys changed. I can not use these Hotkeys, because I have a german layout keyboard and for example ctrl-alt-9 writes some kind of weird symbol. So I tried overriding the new commands with the old ones in my keymap.cson. But it did not work.
changekeymap
changekeymap2
As one can see above it did seem to work, however the server does not launch. Is it somehow not possible to override the default keymaps, or am I doing something wrong here?
Thanks in advance

'Failed to spawn command' after 2.1.0 update

Using Linux Mint 17.3

Everything worked fine in v2.0.0, but after updating to v2.1.0 when I try to launch live-server it opens the dev-tools and gives the following error:

Failed to spawn command
/resources/app/apm/bin/node. Make sure /resources/app/apm/bin/node is installed and on your PATH

When I run which node in my terminal I get /usr/bin/node. I'm not sure why the package is looking for a resources directory in my root (/) directory, but there's obviously not one there.

It work

If you have a problem launching a live-server, please try following steps:

  1. Make sure you use the right hotkeys. After v2.0.0, the keys became ctrl-alt combination.
  2. Try launching live-server from top menu: Package -> live-server -> Start Server to see if it works.

Uncaught Error: spawn EACCES

-- Reproduction --

  1. link /usr/bin/node to /usr/lib/app/apm/bin/node

-- OS --
Arch Linux

-- Description --
After pressing Ctrl + Alt + 3 this error appears
It doesn't appear when pressing Ctrl + Alt + 1|2, but the server does not work either

The error used to be different. At first it said that node could not be spawned and that I should make sure that node exists in /usr/lib/app/apm/bin/node (which I did by linking it with my existing installation)

If any further details are required, feel free to ask

Atom: 1.14.3 x64
Electron: 1.4.15
OS: "Arch Linux"
Thrown From: atom-live-server package 2.1.1

Stack Trace

Uncaught Error: spawn EACCES

At /usr/lib/atom/src/buffered-process.js:357

Error: spawn EACCES
    at exports._errnoException (util.js:1026:11)
    at ChildProcess.spawn (internal/child_process.js:313:11)
    at Object.exports.spawn (child_process.js:392:9)
    at BufferedProcess.spawn (/usr/lib/atom/src/buffered-process.js:286:51)
    at new BufferedProcess (/usr/lib/atom/src/buffered-process.js:89:12)
    at /packages/atom-live-server/lib/atom-live-server.js:123:23
    at FSReqWrap.oncomplete (fs.js:123:15)

Commands

     -0:21.6.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always.theme-monokai.theme-one-dark-ui)
     -0:02.0 atom-live-server:start-3000 (input.hidden-input)

Non-Core Packages

angularjs 0.4.0 
atom-beautify 0.29.17 
atom-espresso-soda-theme 0.10.0 
atom-htmltidy 5.1.0 
atom-live-server 2.1.1 
atom-monokai 0.10.9 
autoclose-html 0.23.0 
autocomplete-angular-material 0.4.0 
autocomplete-python 1.8.57 
file-icons 2.0.15 
highlight-selected 0.12.0 
linter 1.11.23 
linter-gcc 0.7.1 
linter-python 3.0.5 
minimap 4.26.8 
minimap-find-and-replace 4.5.1 
minimap-highlight-selected 4.5.0 
monokai 0.22.0 
monokai-blackboard 0.3.0 
monokai-complete-syntax 0.2.3 
monokai-dark 1.3.0 
monokai-flat 1.0.1 
monokai-plus 0.1.3 
monokai-seti 0.7.0 
monokai-shade 0.3.5 
monokai-slate 0.6.0 
python-tools 0.6.9 
sub-monokai 1.2.4 
textmate-espresso-libre-syntax 0.1.0 
textmate-espresso-syntax 0.1.0 
textmate-espresso-tutti-syntax 0.1.0 
todo 0.6.0 

Can I choose browser(other than default)

I have Chrome as my default, but if I want to test in a different browser(safari, firefox, canary, etc) can you show me here I can make this change without breaking this wonderful package?

Thanks in advance!

Error EPERM operation not permitted due to windows debug variable

Hi, I've been using this awesome addon but I just upgraded to Atom 1.9.9 and I'm getting the error below when I try to start the webserver. Any ideas why? I tried reinstalling, but no effect.

Error: EPERM: operation not permitted, write
    at Error (native)
    at Object.fs.writeSync (fs.js:706:20)
    at SyncWriteStream.write (fs.js:2064:6)
    at Function.log (C:\Users\Admin\.atom\packages\atom-live-server\live-server\node_modules\connect\node_modules\debug\node.js:106:17)
    at enabled (C:\Users\Admin\.atom\packages\atom-live-server\live-server\node_modules\connect\node_modules\debug\debug.js:117:11)
    at Function.app.use (C:\Users\Admin\.atom\packages\atom-live-server\live-server\node_modules\connect\lib\proto.js:94:3)
    at Object.LiveServer.start (C:\Users\Admin\.atom\packages\atom-live-server\live-server\index.js:115:4)
    at file:///C:/Users/Admin/.atom/packages/atom-live-server/lib/atom-live-server.coffee:62:35
    at exports.allowUnsafeEval (C:\Users\Admin\.atom\packages\atom-live-server\node_modules\loophole\lib\loophole.js:14:14)
    at Object.module.exports.AtomLiveServer.startServer (file:///C:/Users/Admin/.atom/packages/atom-live-server/lib/atom-live-server.coffee:62:5)
    at atom-workspace.subscriptions.add.atom.commands.add.atom-live-server:start-3000 (file:///C:/Users/Admin/.atom/packages/atom-live-server/lib/atom-live-server.coffee:18:42)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Admin\AppData\Local\atom\app-1.9.9\resources\app.asar\src\command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (C:\Users\Admin\AppData\Local\atom\app-1.9.9\resources\app.asar\src\command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\Admin\AppData\Local\atom\app-1.9.9\resources\app.asar\src\command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\Admin\AppData\Local\atom\app-1.9.9\resources\app.asar\src\atom-environment.js:1104:28)
    at EventEmitter.outerCallback (C:\Users\Admin\AppData\Local\atom\app-1.9.9\resources\app.asar\src\application-delegate.js:329:25)
    at emitTwo (events.js:100:13)
    at EventEmitter.emit (events.js:185:7)

Uncaught TypeError: Cannot read property 'file' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.1.0
System: Mac OS X 10.11.1
Thrown From: atom-live-server package, v1.2.2

Stack Trace

Uncaught TypeError: Cannot read property 'file' of undefined

At /Users/Daniel/.atom/packages/atom-live-server/lib/atom-live-server.coffee:32

TypeError: Cannot read property 'file' of undefined
  at Object.module.exports.AtomLiveServer.getPaths (/Users/Daniel/.atom/packages/atom-live-server/lib/atom-live-server.coffee:32:28)
  at Object.module.exports.AtomLiveServer.startServer (/Users/Daniel/.atom/packages/atom-live-server/lib/atom-live-server.coffee:50:20)
  at atom-workspace.subscriptions.add.atom.commands.add.atom-live-server:start-4000 (/Users/Daniel/.atom/packages/atom-live-server/lib/atom-live-server.coffee:19:42)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:243:29)
  at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:143:19)
  at EventEmitter.module.exports.WindowEventHandler.handleIPCCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:213:28)
  at emitOne (events.js:77:13)
  at EventEmitter.emit (events.js:169:7)

Commands

     -0:16.5.0 atom-live-server:start-3000 (div.package-detail.panels-item)
     -0:00.8.0 atom-live-server:start-4000 (div.package-detail.panels-item)

Config

{
  "core": {}
}

Installed Packages

# User
atom-live-server, v1.2.2

# Dev
No dev packages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.