rename package to nsite-gateway

This commit is contained in:
hzrd149 2025-03-07 17:40:30 +00:00
parent 13f5b2ce20
commit 023e03ec49
7 changed files with 33 additions and 26 deletions

View File

@ -0,0 +1,5 @@
---
"nsite-gateway": minor
---
Rename package to nsite-gateway

View File

@ -1,4 +1,4 @@
# nsite-ts
# nsite-gateway
## 0.6.1

View File

@ -1,12 +1,12 @@
# nsite-ts
# nsite-gateway
A Typescript implementation of [nsite](https://github.com/lez/nsite)
A Typescript implementation of [static websites on nostr](https://github.com/nostr-protocol/nips/pull/1538)
## Running with docker-compose
```sh
git clone https://github.com/hzrd149/nsite-ts.git
cd nsite-ts
git clone https://github.com/hzrd149/nsite-gateway.git
cd nsite-gateway
docker compose up
```
@ -16,24 +16,25 @@ If you need to test, you can directly access the ts server at `http://localhost:
## Running with docker
The `ghcr.io/hzrd149/nsite-ts` image can be used to run a http instance locally
The `ghcr.io/hzrd149/nsite-gateway` image can be used to run a http instance locally
```sh
docker run --rm -it --name nsite -p 8080:80 ghcr.io/hzrd149/nsite-ts
docker run --rm -it --name nsite -p 8080:80 ghcr.io/hzrd149/nsite-gateway
```
## Manual nginx setup
Before manually setting up nginx and nsite-ts you need a few things installed
- [nginx](https://nginx.org/)
- [nodejs](https://nodejs.org/en/download/package-manager) (dep packages [here](https://deb.nodesource.com/))
- [pnpm](https://pnpm.io/) run `npm i -g pnpm` to install
Before manually setting up nginx and nsite-gateway you need a few things installed
Next your going to need to clone the nsite-ts repo and set it up
- [nginx](https://nginx.org/)
- [nodejs](https://nodejs.org/en/download/package-manager) (dep packages [here](https://deb.nodesource.com/))
- [pnpm](https://pnpm.io/) run `npm i -g pnpm` to install
Next your going to need to clone the nsite-gateway repo and set it up
```sh
git clone https://github.com/hzrd149/nsite-ts
cd nsite-ts
git clone https://github.com/hzrd149/nsite-gateway
cd nsite-gateway
# install dependencies
pnpm install
@ -63,7 +64,7 @@ sudo systemctl daemon-reload
sudo systemctl start nsite
```
Then once nsite-ts is running, next you need to configure nginx
Then once nsite-gateway is running, next you need to configure nginx
Start by modifying the `/etx/nginx/nginx.conf` file and adding a `proxy_cache_path` to the `http` section
@ -78,9 +79,10 @@ http {
```
Next modify the default site config (usually `/etx/nginx/sites-enabled/default` or `/etc/nginx/conf.d/default.conf`) to be one of
- [nginx/http.conf](./nginx/http.conf)
- [nginx/tls.conf](./nginx/tls.conf)
- [nginx/tls-and-tor.conf](./nginx/tls-and-tor.conf)
- [nginx/http.conf](./nginx/http.conf)
- [nginx/tls.conf](./nginx/tls.conf)
- [nginx/tls-and-tor.conf](./nginx/tls-and-tor.conf)
Once that is done you can restart nginx and you should have a new nsite server running on port 80

View File

@ -4,7 +4,7 @@ After=network.target
[Service]
Type=simple
WorkingDirectory=/<path-to>/nsite-ts
WorkingDirectory=/<path-to>/nsite-gateway
ExecStart=/usr/bin/node .
Restart=always
RestartSec=10

View File

@ -3,7 +3,7 @@ version: "3.7"
services:
nsite:
build: .
image: ghcr.io/hzrd149/nsite-ts:master
image: ghcr.io/hzrd149/nsite-gateway:master
environment:
LOOKUP_RELAYS: wss://user.kindpag.es,wss://purplepag.es
SUBSCRIPTION_RELAYS: wss://nostrue.com/,wss://nos.lol/,wss://relay.damus.io/,wss://purplerelay.com/

View File

@ -1,5 +1,5 @@
{
"name": "nsite-ts",
"name": "nsite-gateway",
"version": "0.6.1",
"description": "A blossom server implementation written in Typescript",
"main": "build/index.js",

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to nsite-ts</title>
<title>Welcome to nsite-gateway</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
@ -42,8 +42,8 @@
</head>
<body>
<div class="container">
<h1>Welcome to nsite-ts</h1>
<p>If you're seeing this page, nsite-ts has been successfully installed and is working.</p>
<h1>Welcome to nsite-gateway</h1>
<p>If you're seeing this page, nsite-gateway has been successfully installed and is working.</p>
<div class="info">
<p>
@ -59,8 +59,8 @@
</div>
<p>
For more information about configuring nsite-ts, please refer to the
<a href="https://github.com/hzrd149/nsite-ts">documentation</a>
For more information about configuring nsite-gateway, please refer to the
<a href="https://github.com/hzrd149/nsite-gateway">documentation</a>
</p>
</div>
</body>