Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sefinek/node-sharex-server
Node.js project utilizing Express.js for hosting screenshots taken with ShareX.
https://github.com/sefinek/node-sharex-server
express express-js express-project sharex sharex-api sharex-cdn sharex-host sharex-server sharex-upload sharex-uploader sharexuploader
Last synced: about 2 months ago
JSON representation
Node.js project utilizing Express.js for hosting screenshots taken with ShareX.
- Host: GitHub
- URL: https://github.com/sefinek/node-sharex-server
- Owner: sefinek
- License: mit
- Created: 2024-02-14T15:38:32.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-11-29T12:05:36.000Z (2 months ago)
- Last Synced: 2024-12-06T10:54:35.641Z (2 months ago)
- Topics: express, express-js, express-project, sharex, sharex-api, sharex-cdn, sharex-host, sharex-server, sharex-upload, sharex-uploader, sharexuploader
- Language: JavaScript
- Homepage: https://screenshots.sefinek.net
- Size: 288 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 📷 ShareX Node.js Server
This project allows for the launching of a local server, intended for hosting screenshots taken with the [Sharex](https://getsharex.com/) program.## ✔️ What does it include?
- Configured `CORS`
- Ready logger: `morgan`
- Middlewares ready to handle common errors:
- `429` Too Many Requests
- `408` Request Timeout
- `404` Not Found
- `500` Internal Server Error
- A static `public` folder
- A `robots.txt` file that blocks screenshot indexing
- A preconfigured `ecosystem.config.js` file for [PM2](https://www.npmjs.com/package/pm2)## 🤔 What is this for?
With this solution, you don't have to upload screenshots to external services.
Being an administrator, you can delete screenshots from the server with just a few clicks, thereby revoking everyone's access to the screenshot file.## ☁️ Cloudflare Integration
- For those utilizing [Cloudflare](https://www.cloudflare.com), enhancing your security measures by incorporating specific expressions into the [Web Application Firewall](https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf) (WAF) comes highly recommended.
This approach can significantly bolster your website's defense.
Please visit [this](https://github.com/sefinek/cloudflare-waf-expressions) repository.- If you are using any proxy server (for example, Cloudflare), make sure to adjust the `trust proxy` setting in the [index.js](index.js) file.
A value of 1 indicates a single proxy server. This adjustment is necessary for the server to accurately read the IP addresses of visitors.## 📝 How to use?
1. Clone the repository:
```bash
git clone https://github.com/sefinek/Node-Sharex-Server.git
```
2. Install the necessary packages using `npm install`.
3. Rename the `.env.default` file to `.env` and fill in the necessary data.
4. Run the server using: `node .`
5. Hosting:
- **At home (if you lack open ports or an external IP)** \
See [Cloudflare Tunnel Documentation](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-local-tunnel). Remember, your domain must have Cloudflare DNS settings (at least that's what I believe).
6. File server:
- **SAMBA** \
See [this](https://phoenixnap.com/kb/ubuntu-samba) tutorial.
7. Configuration:
- **Windows** \
![windows.png](images/readme/windows.png)
- **Sharex** \
![sharex-smb.png](images/readme/sharex-smb.png) \
![paths.png](images/readme/paths.png)
8. That's it! You can now take screenshots and upload them to your server.## 💙 Thank you
If you find this repository useful, please consider giving it a star. If you need assistance or have any questions, feel free to open a new [Issue](https://github.com/sefinek/Node-Sharex-Server/issues).## 📑 License
This project is licensed under the [MIT License](LICENSE).