• Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    TypeScript
  • License
    Other
  • Created over 3 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚑ VSCode Extension for Five Server.

Five Server

A better live server

VERSION Visual Studio Marketplace Rating GitHub Sponsors

  • ⚑️ Updates your files instantly while typing on your keyboard
  • β¬’ Remote displays the logs of your browser/phone in your terminal
  • πŸ’‘ Highlights the code you are working on in your browser
  • πŸš€ Navigates your browser automatically to the current editing file
  • 🐘 Includes PHP Support for serving and live reload all your .php files
  • πŸ—„οΈ Supports all Server Side Rendered Apps like express.js

demo

Get Started

4 ways to start your live server.

  1. Click Go Live in the Status Bar (bottom of VSCode)
  2. Right-Click a Open File > Open with Five Server
  3. Right-Click a File in the Explorer > Open with Five Server
  4. Right-Click a Folder in the Explorer > Open with Five Server (root)
    (will set the current folder as root until you stop the server)

Videos

Quick Test

Something is not working? Try the simple setup below:

  • make sure you have uninstalled the old Live Server
  • check if you have the latest version
    VERSION
  • make a new folder www on the desktop
  • add the index.html (see below)
  • open the folder www with VSCode
  • click on Go Live
<!DOCTYPE html>
<html>
  <head>
    <title>HTML Test File</title>
  </head>
  <body>
    <h1>It works!</h1>
  </body>
</html>

The setup above works but your project not?

  • Maybe because your project is on another drive?
  • Or maybe on a USB Stick or remote folder like OneDrive or DropBox?
  • Make sure you open a folder in VSCode and NOT just a single file.
  • All these things can sometimes cause issues.

About PHP

Although Five Server can render, display and live reload PHP, it does not provide a full PHP server. If you want to develop a big PHP app, you manually have to link the client-side Five Server script with your PHP files. See five-server-with-php.

Features

πŸ’‘ Most advanced features are disabled by default.
Turn them on in the settings or by configuring a fiveserver.config.js file in the root of your workspace.

Note:

  • Instant Update & Highlight works with .html and .php files.
  • All remote logs will be visible in a new Terminal called "Five Server".
  • The features highlight, injectBody and remoteLogs are disable by default.
  • To use the highlight feature, injectBody has to be activated.
  • injectBody performs some simple HTML Validation. When using injectBody, a message will be displayed if your HTML Page is invalid.
  • To temporarily disable highlight for a single HTML Tag, add a H.
    Example: <div H>Don't highlight me</div>

Config File Example:

// fiveserver.config.js
module.exports = {
  highlight: true, // enable highlight feature
  injectBody: true, // enable instant update
  remoteLogs: true, // enable remoteLogs
  remoteLogs: "yellow", // enable remoteLogs and use the color yellow
  injectCss: false, // disable injecting css
  navigate: true, // enable auto-navigation
};

More Docs

Known Issues

  • Sometimes injectBody does not work well when using inline JavaScript inside <body>.
    As a workaround, execute your inline scripts after Five Server is connected:
<script>
  const main = () => {
    console.log("Some JavaScript Code...");
  };

  // wait for five-server to connect
  const five = document.querySelector('[data-id="five-server"]');
  if (five) five.addEventListener("connected", main);
  else window.addEventListener("load", main);
</script>

Debug Mode

Need to debug something? Set debugVSCode to true.

// fiveserver.config.js
module.exports = {
  debugVSCode: true,
};

Release Notes

No release notes while < v1.0.0

Support Five Server

GitHub Sponsors
One-Time Donation

More Repositories

1

phaser-project-template

πŸ•ΉοΈ Phaser 3 - Starter Template with TypeScript and webpack.
TypeScript
408
star
2

phaser3-multiplayer-with-physics

Phaser 3 - Real-Time Multiplayer example with Physics (MatterJS and Arcade)
TypeScript
177
star
3

five-server

⚑ Development Server with Live Reload Capability. (Maintained Fork of Live Server)
TypeScript
155
star
4

phaser-project-template-es6

Phaser 3 - Starter Template with ES6 (ESNext features included) and webpack.
JavaScript
149
star
5

phaser3-typescript-platformer-example

Phaser 3 TypeScript Platformer Example
JavaScript
81
star
6

phaser3-matter-car-on-curved-terrain

Phaser 3 + Matter.js: Car on curved terrain crosses a bridge
TypeScript
48
star
7

arcade-physics

Use Arcade Physics without Phaser.
JavaScript
47
star
8

phaser3-react-typescript-example

Phaser 3: with React and TypeScript Example
TypeScript
39
star
9

docker-swarm-visualizer

πŸ‹ A Visualizer for Docker Swarm using the Docker Engine API and Node.js.
TypeScript
35
star
10

phaser3-spine-example

JavaScript
35
star
11

docker-swarm-visualizer-rs

πŸ‹ A Visualizer for Docker Swarm written in Rust.
TypeScript
19
star
12

phaser3-optimal-resolution

JavaScript
18
star
13

phaser3-scaling-resizing-example

Phaser 3 - Scaling/Resizing Example
TypeScript
17
star
14

html2app-template

HTML
17
star
15

express6

πŸ… Modern, fast, unopinionated, minimalist web framework.
TypeScript
16
star
16

five-server-with-php

PHP
14
star
17

node-cli

πŸ–οΈ Build a beautiful Node.js CLI with colors, pre-build elements and optional JSX support.
TypeScript
13
star
18

gitget

πŸ“¦ Clone GitHub repos fast and easy.
TypeScript
11
star
19

ammo-worker-test

JavaScript
10
star
20

three-project-template

Three.js starter template with TypeScript and webpack.
TypeScript
10
star
21

phaser-basic-template

Phaser 3: Basic Starter Template with Intellisense
JavaScript
10
star
22

keyboard

⌨️ Handling of keyboard events.
TypeScript
9
star
23

phaser3-swipeable-level-selection

A very nice swipeable level selection menu for Phaser 3 games.
TypeScript
9
star
24

postgres-browser-proxy

🐘 Query your Postgres Database directly from the Browser.
Rust
8
star
25

react-to-static-or-ssr

A react starter template for creating single page applications, static html files or a server side rendered app.
TypeScript
5
star
26

kronos2-prototype

TypeScript
4
star
27

ionic-react-typescript-starter

Ionic 5 & React - Starter Template written in TypeScript
TypeScript
4
star
28

tauri-webxr-test

Rust
4
star
29

tap

πŸ–±οΈ Handling of user interactions such as mouse, touch and pointer events.
TypeScript
4
star
30

yandeu

3
star
31

events

⚑ Simplified and TypeScripted version of [email protected]
JavaScript
3
star
32

audio

🎡 Audio library for the Web Audio API. (TypeScripted version of Three.js@r126's Audio without Object3D)
TypeScript
3
star
33

handlebars-to-static-or-ssr

Run Handlebars on the Server Side (with node.js and express) or generate Static HTML files.
JavaScript
2
star
34

parse-markdown

TypeScript
2
star
35

docker-php

πŸ‹ A simple PHP environment with Docker for local development.
JavaScript
2
star
36

phaser-phonegap-template

HTML
2
star
37

tiny-http2-server

TypeScript
2
star
38

markdown-mail

πŸ“¬ Turn your Markdown files into Responsive HTML E-Mails.
TypeScript
1
star
39

struct-serval

Rust
1
star
40

www

HTML
1
star
41

wordpress-docker-compose

A simple docker-compose file to spin up WordPress, MariaDB and phpmyadmin.
1
star
42

arcade-physics_dev

JavaScript
1
star
43

video-to-m3u8

HTML
1
star
44

ftp-upload

Rust
1
star
45

nano-jsx-simple-template

JavaScript
1
star
46

npm-template

A simple template for making npm packages.
JavaScript
1
star
47

rust-rocket-mongodb

Rust
1
star
48

nordpress_preview

Dev Repository for nordpress.org
1
star
49

old-phaser-template

JavaScript
1
star
50

tarif590-json

Tarif590 to JSON - Turns "Tarif_590.xlsx" into "tarif590.json".
JavaScript
1
star
51

md-to-book

JavaScript
1
star