Giter Site home page Giter Site logo

lan-share's Introduction

lan-share

WARNING: This version is no longer safe. An improved (currently secure) application is deployed as Ikimi Drive.

A localhost server to transfer data within a LAN.

Written with Scala Play Framework and React.js.

Usage

sbt

The public/ folder may not contain the latest frontend version, so first build inside client/.

# cd client/
# yarn build
# cd ../
sbt run

To run in production mode:

sbt runProd

Configurations may be modified in conf/application.conf.

# Custom Config

# For production mode only
play.server.http.port = 9000
play.server.http.port = ${?PLAY_HTTP_PORT}

# Basic share path
sharePath = "/home/setsunayyw/Documents"
sharePath = ${?LAN_SHARE_PATH}

# Extra path that will show up when logged in as admin, 
# can specify displaying name by changing `alias`. 
# The value of `extraPath` can either be a list of config 
# objects, or a JSON-like string.
extraPath = [
  {
    path = "/home/setsunayyw/Downloads",
    alias = "downloads"
  },
]
extraPath = ${?LAN_SHARE_EXTRA_PATH}

# The admin password
app.user.admin.key = "my_new_admin_key"
app.user.admin.key = ${?ADMIN_KEY}

Or set environment properties in sbt:

eval System.setProperty("PLAY_HTTP_PORT", "8000")
eval System.setProperty("ADMIN_KEY", "another_key")
eval System.setProperty("LAN_SHARE_PATH", "/home/user/Videos")
eval System.setProperty("LAN_SHARE_EXTRA_PATH", """[{"path":"/","alias":"root"},{"path":"/home/","alias":"home"}]""")

Fat JAR

No scala environment is required to run the fat jar. JDK 8 should be installed, other versions of Java may also work but not tested.

java -DPLAY_HTTP_PORT=1234 -DADMIN_KEY='hogehoge' -DLAN_SHARE_PATH='/home' -DLAN_SHARE_EXTRA_PATH='[{"path":"/","alias":"root"}]' -jar lan-share-assembly-1.0-SNAPSHOT.jar

For Powershell, the command should be:

java -DPLAY_HTTP_PORT=1234 -DADMIN_KEY='hogehoge' -DLAN_SHARE_PATH='C:/Users/user/Documents' -DLAN_SHARE_EXTRA_PATH='"""[{""""path"""":""""E:/game"""",""""alias"""":""""game""""}]"""' -jar lan-share-assembly-1.0-SNAPSHOT.jar

Cache

To clear image thumbnail cache, clear .com.remisiki.lan.share/thumbnail/ under the system temp directory.

lan-share's People

Contributors

remisiki avatar

Watchers

 avatar

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.