add standalone binary build step

This commit is contained in:
CoolElectronics 2023-08-16 21:10:37 -04:00
parent dda5302931
commit b06e0a85ab
No known key found for this signature in database
GPG key ID: F63593D168636C50
4 changed files with 18 additions and 8 deletions

View file

@ -1,8 +1,13 @@
# ADrift
ADrift is a Decentralized proxy utilizing the WebRTC protocol.
_surf_the_\_web_adrift\_
# Adrift
Adrift is a Decentralized proxy utilizing the WebRTC protocol.
### Before everything..
install dependencies and build bare-client-custom
```
pnpm install
cd bare-client-custom
@ -12,16 +17,19 @@ cd ..
```
### Getting started
Currently, there aren't any middle nodes, only an exit node which is requires nodejs to run.
### Getting started with the server
inside the server/ directory, run `pnpm install`, followed by `pnpm dev`
### Getting started with the client
Inside the frontend/ directory, run `pnpm install` and then `VITE_ADRIFT_DEV=1 VITE_ADRIFT_SINGLEFILE= pnpm dev`
### Quick server setup (linux)
```
git submodule update --init --recursive
pnpm install
@ -35,6 +43,7 @@ pnpm dev
```
### Quick client setup (linux)
```
git submodule update --init --recursive
pnpm install

View file

@ -2,7 +2,7 @@ let makeAllPackagesExternalPlugin = {
name: 'make-all-packages-external',
setup(build) {
let filter = /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/ // Must not start with "/" or "./" or "../"
let ignored = []
let ignored = ["wrtc"]
build.onResolve({ filter }, args => (ignored.includes(args.path) ? { path: args.path, external: true } : null))
},
}
@ -12,7 +12,7 @@ build({
platform: "node",
// format: "esm",
bundle: true,
outfile: "dist/dist.js",
outfile: "dist/main.js",
plugins: [
makeAllPackagesExternalPlugin
],

View file

@ -5,7 +5,8 @@
"main": "src/main.ts",
"scripts": {
"start": "tsx src/main.ts",
"dev": "tsx src/dev.ts"
"dev": "tsx src/dev.ts",
"prod": "node esbuild.bundle.js && pkg src/main.js"
},
"keywords": [],
"author": "",

View file

@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "ES2017",
"module": "ESNext",
"module": "CommonJS",
"lib": ["dom", "es6", "es2017", "esnext.asynciterable"],
"skipLibCheck": true,
"sourceMap": true,