ShareX server using Next.js API, to shorten URLs, upload image, paste codes, with a simple and easy to use UI
Find a file
2023-10-31 01:50:40 +00:00
public license 2023-10-31 01:50:40 +00:00
src license 2023-10-31 01:50:40 +00:00
.env.example license 2023-10-31 01:50:40 +00:00
.gitignore license 2023-10-31 01:50:40 +00:00
LICENSE license 2023-10-31 01:50:40 +00:00
next.config.js license 2023-10-31 01:50:40 +00:00
NXC Image & File.sxcu license 2023-10-31 01:50:40 +00:00
NXC Paste.sxcu license 2023-10-31 01:50:40 +00:00
package.json license 2023-10-31 01:50:40 +00:00
README.md license 2023-10-31 01:50:40 +00:00
tsconfig.json license 2023-10-31 01:50:40 +00:00

NXC Host

Licence CC BY-NC-SA 4.0 Kofi

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 or follow the steps below.

First of all, you need to install NodeJS and MongoDB in your server.

Then, clone the repository and install the dependencies:

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:

npm run build
npm run start

If you have any question, please join my Discord Server and ask in the support channel.

Routes

/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