Skip to content
Snippets Groups Projects

A small, self-contained, cross-platform web server for development

This tool helps to serve files.

Install

Conan is a binary file that must be stored in a directory. The files can be found here.

wget -O ~/.local/bin/conan  http://download.schukai.com/tools/conan/conan-$( uname -s | tr [:upper:] [:lower:])-$(echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`)  
## For Linux, the execution bit must still be set.
chmod u+x ~/.local/bin/conan

Commands

General Parameters

Configuration

Server:

  # The hostname or IP address of the server (CONAN_SERVER_HOST)
  # Domain, IP or hostname of the server
  # Host: localhost:8080

  # The port of the server (CONAN_SERVER_ADDRESS)
  # Address: localhost

  # The port of the server (CONAN_SERVER_PORT)
  # Port: 8080

  # 
  Path:
    # The path to the server (CONAN_SERVER_WEB_PATH)  
    Web: web

  Watch:
    - Path: src
      Command: /bin/bash -c "npx esbuild --bundle --outfile={{ .WebPath }}/scripts/bundle.js --sourcemap {{ .Path }}"
      Exclude:
        - ~$
        - ^\.
    - Path: web
      Exclude:
        - ~$
        - ^\.

  Flags:
    FollowSymlinks: true

The following placeholders can be used in the Commandline.

Placeholder Description
Path The Watched Path
IsDir Is the Path a directory?
Directory If the path is a file, then the directory here
WebPath The Web Path
ConfigPath The Config Path
PID The Process ID (Server)
Bin The command used to start the server.
Call The entire call

The !reload command can be used to send the browser a message to reload the page. The command must be enclosed in quotation marks.



### Server

Start server and deliver files.

```bash
conan server serve

Start with configuration file.

conan server start --config config.yaml

Help

There is help on the command line for each individual command.

conan --help

Change Log

  • Version 1.0
    • Initial release

License # Credits