https://github.com/night0721/nxc-host
ShareX server using Next.js API, to shorten URLs, upload image, paste codes, with a simple and easy to use UI
https://github.com/night0721/nxc-host
file-uploader image-uploader nextjs pastebin sharex url-shortener
Last synced: 8 months ago
JSON representation
ShareX server using Next.js API, to shorten URLs, upload image, paste codes, with a simple and easy to use UI
- Host: GitHub
- URL: https://github.com/night0721/nxc-host
- Owner: night0721
- License: gpl-3.0
- Created: 2023-04-16T09:38:52.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-03T13:42:13.000Z (over 2 years ago)
- Last Synced: 2025-03-21T02:16:48.470Z (about 1 year ago)
- Topics: file-uploader, image-uploader, nextjs, pastebin, sharex, url-shortener
- Language: TypeScript
- Homepage: https://host.night0721.xyz
- Size: 1.2 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
NXC Host
NXC is a simple host for URL shortener, paste bin and image uploader. It's written in NextJS with typescript and uses MongoDB as database.
If you like the repository, please consider giving it a star⭐!
# Deployment
You can either watch the [video](https://youtu.be/VhNGKyPGF2g) or follow the steps below.
First of all, you need to install [NodeJS](https://nodejs.org/en/) and [MongoDB](https://www.youtube.com/watch?v=aygw0wjW5bA) in your server.
Then, clone the repository and install the dependencies:
```cmd
git clone https://github.com/night0721/nxc-host
cd nxc-host
npm install
```
After that, you need to change the `.env.example` file to `.env` and fill the variables.
In the `.env` file, you should put NEXT_PUBLIC_HOST(eg. http://localhost:3000 or https://google.com) as your domain name and MONGO as your MongoDB connection string.
Finally, you can run the server with:
```cmd
npm run build
npm run start
```
If you have any question, please join my [Discord Server](https://discord.gg/SbQHChmGcp) and ask in the support channel.
## Routes
```md
/s -> URL Shortener
/s/:id -> Redirecting to Long URL
/p -> Paste Bin
/p/:id -> Paste by specific ID
/raw/:id -> Raw Paste by specific ID
/i -> Image Uploader
/i/:id -> Image by specific ID
/i/raw/:id -> Raw Image by specific ID
/api/:type/delete -> Delete model by type
POST /api/image -> Send new image to server
POST /api/paste -> Send new paste to server
POST /api/url -> Send new URL to server
```