0
0

More than 3 years have passed since last update.

自分のローカルの状態を他の人に共有する方法

Last updated at Posted at 2020-01-31
$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
    inet 127.0.0.1 netmask 0xff000000 
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
XHC20: flags=0<> mtu 0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether ac:bc:32:c4:16:ab 
    inet6 fe80::1d:33bb:a5e:c0fd%en0 prefixlen 64 secured scopeid 0x5 
    inet 19*.**8.1.** netmask 0xfffff800 broadcast 192.168.7.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active

...以下省略

19*.**8.1.**が自分のプライベートIPアドレスなのでローカルを立ち上げ

サーバを立ち上げる時に -b オプション
bin/rails s -p 3540 -b 0.0.0.0

http://19*.**8.1.**:3540
にアクセスでスマホなど外部からも接続できる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0