Skip to content

ShareX server made in Nodejs. Includes images, videos, code, text, markdown rendering, logging via discord, and url shortening

License

Notifications You must be signed in to change notification settings

ipwnosx/node-sharex-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nodejs ShareX Server

Supported Types Of Uploads

  • Images

  • Videos

  • Plain Text

  • Code (With Syntax Highlighting)

  • URL Shortening

Installation

  • Install Nodejs ~8.0.0 (https://nodejs.org/en/)

  • Download Repository

  • Install Dependencies (npm install in your terminal)

Configuration

{
  "key": "", // password needed for all uploads. Leave blank if you want this to be public
  "host":"",
  "save": "",
  "maxUploadSize": 50, // Size in MB
  "allowed":[ // supported filetypes
    "png", "jpg", "gif", "mp4", "mp3", "jpeg", "tiff", "bmp", "ico", "psd", "eps", "raw", "cr2", "nef", "sr2", "orf", "svg", "wav", "webm", "aac", "flac", "ogg", "wma", "m4a", "gifv"
  ],
  "admin":{
    "key": "password1234", // "Admin" password used for higher upload sizes/more supported file types 
    "save": "",
    "maxUploadSize": 1024, // Size in MB
    "allowed": [ // supported filetypes
    "png", "jpg", "gif", "mp4", "mp3","jpeg", "tiff", "bmp", "ico", "psd", "eps", "raw", "cr2", "nef", "sr2", "orf", "svg", "wav", "webm", "aac", "flac", "ogg", "wma", "m4a", "gifv", "html"
     ]
  },
  "paste": {
    "maxUploadSize": 20, // Size in MB
    "save": "",
    "allowed": [ // supported filetypes (all gets converted to an html document)
      "js", "php", "html", "txt", "lua", "json", "yml", "go", "cr", "bat", "css", "cs", "java", "py", "less", "c", "cpp", "ini", "pl", "sql", "rb"
    ]
  },
  "discordToken": "thisismydiscordapitoken", // Leave blank if you dont want to monitor uploads/shortened urls through Discord (https://discordapp.com/developers)
  "discordAdminIDs": ["discord IDs of people who can run commands go here", "Like this"], // IDs of people who are able to run commands with the bot
  "discordChannelID": "2222222222222" // channel the API will use to monitor (will send user IP addresses to this channel, along with what they uploaded, filezise, type of user (user/admin), and a link to their upload. For shortened URLS, it will show the URL they shortened)
  "prefix": "enter prefix for bot commands here" // prefix the bot will use
}

Additional Customization

  • You can place an index.html file in /pages/, but it's not required

  • You can use different css stylesheets for the /api/paste endpoint. You can find them here: https://highlightjs.org/

About

ShareX server made in Nodejs. Includes images, videos, code, text, markdown rendering, logging via discord, and url shortening

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 91.2%
  • CSS 7.6%
  • Other 1.2%