Giter Site home page Giter Site logo

Comments (4)

gbdematos avatar gbdematos commented on May 29, 2024

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>

from witchcraft.

Ashus avatar Ashus commented on May 29, 2024

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.

from witchcraft.

MijoBarbaric avatar MijoBarbaric commented on May 29, 2024

https://simplewebserver.org/docs/wsc.html

from witchcraft.

edbrannin avatar edbrannin commented on May 29, 2024

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

from witchcraft.

Related Issues (20)

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.