Skip to content

Commit 3887bca

Browse files
authored
Merge pull request #4 from eosnetworkfoundation/zach-yarn
Yarn + npmrc + README
2 parents 7abf3bf + 88a9f9d commit 3887bca

File tree

5 files changed

+2165
-5
lines changed

5 files changed

+2165
-5
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

README.md

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,91 @@
11
# Rex Staking Portal
2-
32
This is a staking UI for EOS REX built in SvelteKit.
43

5-
It simplifies the process of staking, unstaking, and claiming rewards post tokenomics-2 upgrade.
4+
It simplifies the process of staking, un-staking, and claiming rewards post-tokenomics-2 upgrade.
5+
6+
You can see it live at [https://stake.eosnetwork.com](https://stake.eosnetwork.com).
7+
8+
<!-- contents box begin -->
9+
<table>
10+
<tr/>
11+
<tr>
12+
<td>
13+
<p/>
14+
<div align="center">
15+
<b>Contents</b>
16+
</div>
17+
<p/>
18+
<!-- contents markdown begin -->
619

7-
You can see it live at https://stake.eosnetwork.com/
20+
1. [Development](#development)
21+
1. [Prerequisites](#prerequisites)
22+
1. [Initialization](#initialization)
23+
1. [Build](#build)
24+
1. [Serve](#serve)
25+
1. [See Also](#see-also)
26+
27+
<!-- contents markdown end -->
28+
<p/>
29+
</td>
30+
</tr>
31+
</table>
32+
<!-- contents box end -->
833

934
## Development
35+
Start here to build this project or to contribute to this repo.
36+
37+
> [!NOTE]
38+
> The source of truth for the version of nodeJS this project supports is the [`.nvmrc`](./.nvmrc) file. Backward- or forward-compatibility with other versions of `node` is made on a best-effort basis, but is not guaranteed.
1039
40+
### Prerequisites
41+
You will need the following tools:
42+
- [nvm](https://github.com/nvm-sh/nvm#installing-and-updating)
43+
- [nodeJS](https://www.w3schools.com/nodejs/nodejs_intro.asp)
44+
Install `node` using `nvm`. In the root of this repo:
45+
```bash
46+
nvm install
47+
```
48+
This will automagically install and use the correct version of `node` for this project, as defined in the [`.nvmrc`](./.nvmrc) file.
49+
- [yarn](https://yarnpkg.com) version 1
50+
The easiest way to install this is using `npm`, which is installed with `node` by `nvm`.
51+
```bash
52+
npm install --global yarn
53+
```
54+
These tools are all you need to get started!
55+
56+
### Initialization
57+
Once you have the [prerequisites](#prerequisites) installed, you can get going by making sure `nvm` is using the correct version of nodeJS...
58+
```bash
59+
nvm install
60+
```
61+
...and then downloading all project dependencies.
1162
```bash
12-
bun i
13-
bun dev
63+
yarn
1464
```
65+
Easy.
66+
67+
### Build
68+
This is how release artifacts are generated.
69+
```bash
70+
yarn build
71+
```
72+
The "build" generates a `build` folder in the root of the repo that can be uploaded directly to AWS S3 using the web console, AWS CLI, or with something like ~~Terraform~~ Tofu.
73+
74+
### Serve
75+
Running this...
76+
```bash
77+
yarn serve
78+
```
79+
...uses [Caddy](https://caddyserver.com) in `file_server` mode to publish the build artifacts in the `build` folder in the root of the repo at port `8443` to emulate an S3 bucket. You can load this in your browser by nativating to [https://localhost:8443](https://localhost:8443).
80+
81+
Press `[Ctrl]` + `[C]` to stop the server.
82+
83+
## See Also
84+
More resources.
85+
- [aws-cloudwatch-alarm-handler](https://github.com/eosnetworkfoundation/aws-cloudwatch-alarm-handler) lambda
86+
- [devhub](https://github.com/eosnetworkfoundation/devhub) - learn portal
87+
- [telegram-bot](https://github.com/eosnetworkfoundation/telegram-bot) lambda
88+
89+
---
90+
> **_Legal Notice_**
91+
> This repo contains assets created in collaboration with a large language model, machine learning algorithm, or weak artificial intelligence (AI). This notice is required in some countries.

bun.lockb

-124 KB
Binary file not shown.

scripts/serve.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ echo -e '\e[1;36mURL: https://localhost:8443\e[0m'
1010
echo -e '\e[1;93mPress [Ctrl] + C to exit...\e[0m'
1111

1212
ee "docker run -v \"\$(git rev-parse --show-toplevel):/http\" -w '/http' -p '8443:8443' caddy caddy run --config caddyfile"
13+
echo "Done. - ${BASH_SOURCE[0]}"

0 commit comments

Comments
 (0)