Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome Web Server Alternatives #60

Open
willpercey-gb opened this issue Jun 1, 2023 · 4 comments
Open

Chrome Web Server Alternatives #60

willpercey-gb opened this issue Jun 1, 2023 · 4 comments

Comments

@willpercey-gb
Copy link

I thought I'd raise this as the documentation specifies to use Chrome Web Server.

Since Chrome Web Server has now been shutdown, there are some other alternatives people can use.

My personal preference: Docker
docker run -it -d -p 5743:80 --restart unless-stopped --name witchcraft -v ~/witchcraft-scripts:/usr/share/nginx/html nginx

Then as long as docker is running it'll always work.

Alternatively npm's http-server
cd witchcraft-scripts && http-server -p 5743

@gbdematos
Copy link

gbdematos commented Oct 20, 2023

I use https://github.com/TheWaWaR/simple-http-server and https://github.com/winsw/winsw.

<service>
  <id>witchcraft-server</id>
  <executable>server</executable>
  <arguments>--nocache "D:\GoogleDrive\Dev\witchcraft" -p 5743</arguments>
  <log mode="none"></log>
</service>

@Ashus
Copy link

Ashus commented Nov 4, 2023

I just use a nginx, here is a config for windows:

error_log NUL crit;
pid z:/temp/witchcraft-nginx.pid;

worker_processes  1;
events {
    worker_connections  512;
}

http {
    access_log off;
    
    client_body_temp_path z:/temp 1 2;
    proxy_temp_path z:/temp 1 2;
    fastcgi_temp_path z:/temp 1 2;
    uwsgi_temp_path z:/temp 1 2;
    scgi_temp_path z:/temp 1 2;
    
    include mime.types;
    default_type application/octet-stream;
    charset utf-8;

    sendfile        on;

    keepalive_timeout  60;

    server {
        listen       127.0.0.1:5743;
        server_name  witchcraft;
        
        location / {
            root   ../Witchcraft-mods;
            index  html/index.html;
            
            expires 10s;
            add_header Cache-Control "private";
        }
    }
}

You just need to replace the z:/temp with your temporary dir as nginx config doesn't support environment variables.

@MijoBarbaric
Copy link

@edbrannin
Copy link

edbrannin commented Dec 27, 2023

If you have NodeJS installed, you can use browser-sync:

#!/bin/bash
npx browser-sync start --server --files --watch --directory --port 5743 --no-open --listen 127.0.0.1 .

Edit: Add --no-open and --listen 127.0.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants