Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mion/static-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

19 Commits

Repository files navigation

static-http

Isn't it annoying to write a little server.js file everytime you're fooling around with HTML and JS?

Well you can just:

npm install static-http

And navigate to your folder with cd and then:

$ cd path-to/my-awesome-folder
$ ls
> awesome.html code.js style.css
$ static-http `pwd`
> [*] Static server running on port 3600, serving files from: path-to/my-awesome-folder

Now that you've got a static HTTP server running on port 3600 (default), point your browser at http://localhost:3600/awesome.html and voilà!

Choose another port

If you want to specify another port:

$ static-http `pwd` --port 1234

Or:

$ static-http `pwd` -p 1234

If there's something running on the port you chose, it will let you know.

[ERROR] The specified port 1234 is already in use.
Please, choose another port.

About

Serve static files locally with HTTP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /