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-11-03 12:42:02 +00:00
public change icon.png to icon.jpg 2023-11-03 12:42:02 +00:00
src change icon.png to icon.jpg 2023-11-03 12:42:02 +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 reamde 2023-10-31 01:51:36 +00:00
tsconfig.json license 2023-10-31 01:50:40 +00:00

NXC Host

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