49 lines
925 B
Markdown
49 lines
925 B
Markdown
# Beam Experiment
|
|
|
|
The server is a@10.0.0.1. This is on a wireguard network.
|
|
|
|
## .env
|
|
it retrieves environment variables from ../frm.so/.env
|
|
|
|
## Logs
|
|
logs go to /root/beam/prod.log (runtime.exs)
|
|
requests go to ./priv/logs/requests.json
|
|
|
|
## To Run
|
|
|
|
dev:
|
|
```
|
|
iex -S mix
|
|
```
|
|
|
|
prod:
|
|
```
|
|
MIX_ENV=prod elixir --name a@10.0.0.1 --cookie shutupnigga --erl "-detached -kernel inet_dist_listen_min 9100 inet_dist_listen_max 9100" -S mix run --no-halt
|
|
```
|
|
|
|
if having problems: run without --detached.
|
|
|
|
to kill ports:
|
|
|
|
```
|
|
lsof -ti:4000 | xargs kill
|
|
lsof -ti:9100 | xargs kill
|
|
```
|
|
|
|
The inet_dist_listen_min part of this is telling it to use port 9100 to listen for outside connections. Otherwise, it would use a random high port. This 9100 is stored in the
|
|
|
|
# Install Packages
|
|
```
|
|
mix deps.get
|
|
```
|
|
|
|
# Terminal Commands
|
|
```
|
|
Node.list()
|
|
```
|
|
|
|
# Connect Remotely
|
|
|
|
```
|
|
iex --name console@10.0.0.2 --cookie shutupnigga --remsh a@10.0.0.1
|
|
``` |