Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/h5law/paste-site
Basic preact frontend site for the paste-server instance
https://github.com/h5law/paste-site
javascript nodejs pastebin pastebin-client preact
Last synced: 16 days ago
JSON representation
Basic preact frontend site for the paste-server instance
- Host: GitHub
- URL: https://github.com/h5law/paste-site
- Owner: h5law
- License: bsd-3-clause
- Created: 2022-09-02T15:05:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-13T19:44:56.000Z (6 months ago)
- Last Synced: 2024-08-07T18:12:53.714Z (4 months ago)
- Topics: javascript, nodejs, pastebin, pastebin-client, preact
- Language: JavaScript
- Homepage:
- Size: 4.75 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - h5law/paste-site - Preact frontend site for the paste-server instance (nodejs)
README
# paste-site
This is a simple Preact frontend for the [paste-server](https://github.com/h5law/paste-server)
## Install
This requires Node v16.16.0+
To install simply clone this repo and install the npm dependencies:
```
git clone https://github.com/h5law/paste-site
cd paste-site
npm i
```Then to run in a non production environment do either:
`NODE_ENV="development" npm run dev` or `NODE_ENV="development" npm run serve`It is needed to use the `NODE_ENV` before the command so that the SPA looks for
the paste-server instance running locally on `127.0.0.1:3000` for the API calls
as otherwise the SPA will assume this is being served through the paste-server
instance it is made for, and will use the `window.location.origin` value for
making API calls which wont work unless the paste-instance server is both
running AND on the same port.## Build
To build this yourself simply run:
```
npm run build
```And have your [paste-server](https://github.com/h5law/paste-server) instance
point to the build directory when starting it using the `--spa-dir` flag:
```
paste-server start -v --spa-dir="./build"
```## TODO
- Make look and feel better
- Add syntax highlighting with highlight.js