Skip to content

Commit ecd5aa7

Browse files
committed
Update README.md
1 parent c6e99ce commit ecd5aa7

File tree

1 file changed

+53
-2
lines changed

1 file changed

+53
-2
lines changed

README.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,55 @@
1-
# Portal Net
1+
# Portal
22

3-
Portal Net is a peer-to-peer library and standalone executable designed to
3+
Portal is a peer-to-peer library and standalone executable designed to
44
make peer-to-peer networking more accessible.
5+
6+
## Downloads
7+
8+
### Direct downloads
9+
10+
* [All releases](https://github.com/sogouda/portal/releases)
11+
* [Latest release](https://github.com/sogouda/portal/releases/latest)
12+
13+
### npm *(Node Package Manager)*
14+
15+
```sh
16+
npm i -g @sogouda/portal
17+
```
18+
19+
## Usage
20+
21+
Replace `portal` in the following commands with the name of your `portal` executable.
22+
23+
Operating system | Executable name
24+
---------------- | ---------------
25+
Linux | `portal`
26+
Windows | `portal.exe`
27+
Mac / OS X | `portal-osx`
28+
29+
### Host a server
30+
31+
Run the following command *(replace `25565` with the port number of your server)*.
32+
33+
```sh
34+
portal port host -p 25565
35+
```
36+
37+
You'll see output similar to the following:
38+
39+
```json
40+
{"publicKey":"ed8d689b12d2a1998e7f284c16031bcb89cec5065c84e206975eebee438caf95"}
41+
```
42+
43+
Copy the public key in between the parenthesis *(in this case, `ed8d689b12d2a1998e7f284c16031bcb89cec5065c84e206975eebee438caf95`)*.
44+
Send this code to your friend.
45+
This is the code that your friend will need to paste in the following steps for [joining a server](#join-a-server).
46+
47+
### Join a server
48+
49+
Run the following command *(replace `ed8d689b12d2a1998e7f284c16031bcb89cec5065c84e206975eebee438caf95` with [the public key of your server](#host-a-server))*.
50+
51+
```sh
52+
portal port join -p 25565 ed8d689b12d2a1998e7f284c16031bcb89cec5065c84e206975eebee438caf95
53+
```
54+
55+
This will output a JSON string containing the connection details.

0 commit comments

Comments
 (0)