Skip to content

ShareX server using Next.js API, to shorten URLs, upload image, paste codes, with a simple and easy to use UI

License

Notifications You must be signed in to change notification settings

night0721/nxc-host

Repository files navigation

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:https://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

About

ShareX server using Next.js API, to shorten URLs, upload image, paste codes, with a simple and easy to use UI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published