The backend for Paste. https://paste.fascinated.cc
This repository has been archived on 2024-06-10. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Lee 3f4c542265
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m48s
Publish Docker Image / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 59s
Merge pull request 'Update dependency io.sentry:sentry-spring-boot-starter-jakarta to v7.10.0' (#10) from renovate/io.sentry-sentry-spring-boot-starter-jakarta-7.x into master
Reviewed-on: #10
2024-06-09 20:07:26 +00:00
.gitea/workflows Update s4u/setup-maven-action action to v1.13.0 2024-05-17 19:01:14 +00:00
src fix xml? 2024-06-08 01:53:22 +01:00
.gitignore add logs 2024-04-23 00:46:39 +01:00
Dockerfile Update maven Docker tag to v3.9.7 2024-05-28 21:01:17 +00:00
LICENSE add license 2024-04-24 21:28:01 +01:00
pom.xml Update dependency io.sentry:sentry-spring-boot-starter-jakarta to v7.10.0 2024-06-06 14:01:17 +00:00
README.md add readme 2024-06-05 12:03:10 +01:00
renovate.json Add renovate.json 2024-04-23 15:00:40 +00:00

Paste

A simple pastebin service. Running at paste.fascinated.cc.

Javascript Utility

/**
 * Uploads a paste to paste.fascinated.cc
 *
 * @param content the content of the paste
 * @returns the paste key and the URL
 */
async function uploadPaste(content: string) {
  const response = await fetch("https://paste.fascinated.cc/api/upload", {
    method: "POST",
    body: content,
  });
  const json = await response.json();

  if (!response.ok) {
    throw new Error(json.message);
  }

  return {
    ...json,
    url: `https://paste.fascinated.cc/${json.key}`,
  };
}

console.log(await uploadPaste("Hello, World!"));