{"id":13514633,"url":"https://github.com/isurfer21/Suxm","last_synced_at":"2025-03-31T03:31:05.092Z","repository":{"id":81965147,"uuid":"90290036","full_name":"isurfer21/Suxm","owner":"isurfer21","description":"A blazing fast lightweight command-line based micro webserver","archived":false,"fork":false,"pushed_at":"2019-12-29T17:17:18.000Z","size":158,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-01T18:37:34.412Z","etag":null,"topics":["command-line-tool","desktop-application","development-utility","golang","installable","webserver"],"latest_commit_sha":null,"homepage":"https://isurfer21.github.io/Suxm/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isurfer21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-05-04T17:20:55.000Z","updated_at":"2024-02-22T10:31:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdf5e697-0dc0-43df-b652-9dff6bfaeef8","html_url":"https://github.com/isurfer21/Suxm","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isurfer21%2FSuxm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isurfer21%2FSuxm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isurfer21%2FSuxm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isurfer21%2FSuxm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isurfer21","download_url":"https://codeload.github.com/isurfer21/Suxm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246413377,"owners_count":20773053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","desktop-application","development-utility","golang","installable","webserver"],"created_at":"2024-08-01T05:00:59.523Z","updated_at":"2025-03-31T03:31:02.394Z","avatar_url":"https://github.com/isurfer21.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Suxm\n\n*Copyright (c) 2017 Abhishek Kumar. This work is licensed under the __Apache License 2.0__*\n\n\nA micro web-server meant to serve locally and is very fast web-server that will make use of full capacity of your system. \n\n### Automatic installation\nTo install the app directly on your system, use the commands given below on Terminal.\n\n##### Recommended script to use\nUse the below installation script code based on what your system supports, like\n\n- on **Windows** use *PowerShell* (default)\n- on **macOS** / **Linux** use either *Shell* (default) or *PowerShell Core* (if already available)\n\n#### Install latest version\n\nWith *Shell*:\n\n```bash\ncurl -fsSL https://isurfer21.github.io/Suxm/install.sh | sh\n```\n\nWith *PowerShell*:\n\n```powershell\niwr https://isurfer21.github.io/Suxm/install.ps1 -useb | iex\n```\n\n#### Install specific version\n\nWith *Shell*:\n\n```bash\ncurl -fsSL https://isurfer21.github.io/Suxm/install.sh | sh -s v1.0.1\n```\n\nWith *PowerShell*:\n\n```powershell\niwr https://isurfer21.github.io/Suxm/install.ps1 -useb -outf install.ps1; .\\install.ps1 v1.0.1\n```\n\n### Semi-automatic installation\nTo install the app after manually downloading it on your system, use the links given below and follow the commands thereafter.\n\n#### Download portable version\n  \n- [Suxm\\_linux\\_x86-64.tar.bz2](https://app.box.com/s/zoeet80oebvzrth4wh38iibdulegvlrb)\n- [Suxm\\_macos\\_x86-64.tgz](https://app.box.com/s/aznzq3g4hu26ayw9u0vhay1kmus52yvb)\n- [Suxm\\_windows\\_x86-64.zip](https://app.box.com/s/e5mf5ujome2ilis25s3hxqs6e0t2rmac)\n\n#### Install portable version on Windows\n\n1. Unzip the `Suxm_windows_x86-64.zip` anywhere on your system.\n2. Go to the unzipped folder and double click on `setup.bat` file, it will install the application on your system.\n\n##### Troubleshoot\n\nOpen the **Command Prompt**, run `suxm -h`. If you see the following message, \n\n```\nC:\\\u003esuxm -h\n'suxm is not recognized as an internal or external command, \noperable program or batch file.\n``` \n\nthen you need to manually modify or verify if the path is properly added in user's environment variable.\n\n##### How to modify/verify windows environment variable?\n\n1. Open File Explorer and go to `Control Panel\\System and Security\\System`, where you will see the basic information about your computer.\n2. Click on the **Advance system settings** link provided in sidebar at left, to open *System Properties*.\n3. Click on **Environment Variables...** button in *Advanced* tab of *System Properties* window. \n4. Click on **PATH** in System variables section to edit it.\n5. Add this path `%APPDATA%\\Suxm\\bin` at the end. Suxm path should be separated by semicolon from other existing paths.\n6. Click on *OK* button to close all the popup windows one-by-one.\n\n#### Install portable version on MacOS / Linux\n\n1. Unzip the `Suxm_macos_x86-64.zip` for Mac OS while  `Suxm_linux_x86-64.zip` for Linux; anywhere on your system.\n2. Open the **Terminal** program (this is in your Applications/Utilites folder by default) and go to the unzipped folder using `cd $HOME/Downloads/Suxm_linux_x86-64`.\n3. Run this command, `sh setup.sh`, it will install the application on your system.\n\n##### Troubleshoot\n\nOpen the **Terminal**, run `suxm -h`. If you see the following message, \n\n```\n$ suxm -h\n-bash: suxm: command not found\n```\n\nthen you need to manually modify or verify if the path is properly added in `~/.bash_profile`.\n\n##### How to modify/verify macos/linux bash_profile?\n\n1. Open the Terminal program (this is in your Applications/Utilites folder by default). Run this command, `touch ~/.bash_profile; open ~/.bash_profile`, it will open the file in the your default text editor.\n2. Add this line in the `.bash_profile`, `export PATH=\"$PATH:$HOME/Documents/Programs/Suxm\"` on MacOS, while `export PATH=\"$PATH:$HOME/Programs/Suxm\"` on Linux.\n3. Save the file and quit the text editor. Execute your `.bash_profile` to update your PATH using `source ~/.bash_profile`\n\n### Usage\n\n```\n$ suxm --help\n\nSuxm webserver (Version 1.0.1) \nCopyright (c) 2017 Abhishek Kumar.\nLicensed under the Apache License 2.0.\n\nOptions:\n\n  -h, --help               display help information\n  -p, --port[=8080]        set custom port number\n  -u, --host[=127.0.0.1]   set host IP or server address\n  -d, --docpath            set document directory's path\n  -b, --browser[=true]     open browser on server start\n  -a, --approot[=false]    serve from application's root\n  -x, --cors[=false]       allows cross domain requests\n  -m, --mime[=false]       allows custom content-type header\n\nDone!\n\n```\n\n##### Serving from server-root\n\nWhen your *webapp* directory is inside **Suxm** directory or alongside it's executable application.\n\n```\n$ suxm -a=true -d=/webapp -p=9000\n\nSuxm webserver (Version 1.0.1) \nCopyright (c) 2017 Abhishek Kumar.\nLicensed under the Apache License 2.0.\n\nServer settings \n  Root   /Users/abhishekkumar/Applications/Suxm/webapp\n  URL    http://127.0.0.1:9000 \n  Time   Sun, 25 Jun 2017 02:08:26 IST\n\nServer status: STARTED\nA browser window should open. If not, visit the link.\nPlease hit 'ctrl + C' to STOP the server.\n```\n\n##### Serving from current directory\n\nWhen your *webapp* directory is placed somewhere else on your system. \n\n```\n$ cd /Users/abhishekkumar/Documents/webapp/\n$ suxm -p=9000\n\nSuxm webserver (Version 1.0.1) \nCopyright (c) 2017 Abhishek Kumar.\nLicensed under the Apache License 2.0.\n\nServer settings \n  Root   /Users/abhishekkumar/Documents/webapp/ \n  URL    http://127.0.0.1:9000 \n  Time   Sun, 25 Jun 2017 02:08:26 IST\n\nServer status: STARTED\nA browser window should open. If not, visit the link.\nPlease hit 'ctrl + C' to STOP the server.\n```\n\n##### Serving from relative directory\n\nWhen your *webapp* directory is placed further inside the sub-folder of current directory.\n\n```\n$ cd /Users/abhishekkumar/Documents/\n$ suxm -d=./webapp -p=9000\n```\n\n##### Custom host address\n\nTo specifiy custom host IP or address, run this command\n\n```\n$ suxm -u=192.168.0.1\n```\n\n##### Custom port number\n\nTo specifiy custom port number, run this command\n\n```\n$ suxm -p=9000\n```\n\n##### Custom host address \u0026 port number\n\nTo specifiy custom host IP or address and port number, run this command\n\n```\n$ suxm -u=192.168.0.1 -p=9000\n```\n\n##### Disable self opening of browser\n\nTo disable, automatic opening of browser on server start, run this command\n\n```\n$ suxm -b=false\n```\n\n##### Cross domain requests\n\nTo allow cross domain requests while serving content, run this command\n\n```\n$ suxm -x=true\n```\n\n##### Custom content-type header\n\nTo respond with custom content-type header while serving content, run this command\n\n```\n$ suxm -m=true\n```\n\nWhile on browser, add content-type query parameter in URL with custom content-type value.\n\nFor example, when requested a *markdown* file via URL [http://localhost/readme.md](http://localhost/readme.md) then by default it is served with \n\n```\nContent-Type: text/plain; charset=utf-8\n```\n\nbut when `?content-type=text/markdown` is added in the URL as [http://localhost/readme.md?content-type=text/markdown](http://localhost/readme.md?content-type=text/markdown) then it is served with\n\n```\nContent-Type: text/markdown\n```\n\nif custom content-type header option `-m` is enabled in `suxm`.\n\n#### Notes\n\n1. All of these command-line options can be used alone or together with other options in any combination/order.\n2. Any of these *boolean* type command-line options can be declared as\n\t- `-b`, `-b=1`, `-b=true` → equivalent\n\t- `-b=0`, `-b=false` → equivalent\n3. The static server would be served on single address only, i.e., by default localhost but if declared custom host address then it would be served on that host address only and would not serve on localhost.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisurfer21%2FSuxm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisurfer21%2FSuxm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisurfer21%2FSuxm/lists"}