本地的开发环境太多,记不住路径?

in #cn4 years ago (edited)

image.png

现在我本地的开发环境太多了,每个开发环境一个端口,实在是脑子不够用,记不住。

于是就写了个简单的页面来负责导航一下。

考虑到可能有时候不一定联网,所以就没有引用类似 jquery 这样的库,再说需求太简单了,直接用原生 js 就搞定了。

<html>
    <head>
        <meta charset="utf-8" />
        <title>Entry</title>
        <style>
            .box a {
                display: block;
                margin: 20px;
                font-size: 30px;
            }
            .box a, .box a:visited, .box a:hover {
                color: rgb(90, 90, 90);
                text-decoration: none;
            }
        </style>
    </head>
    <body>
        <div class="box"></div>
        <script>
            const box = document.getElementsByClassName('box')[0];
            const p = {
                portainer: 'http://localhost:9000',
                phpmyadmin: 'http://localhost/phpmyadmin',
                pgadmin: 'http://localhost:8880',
                faucet: 'http://localhost:3005',
                wallet: 'http://localhost:3007',
                condenser: 'http://localhost:8888',
                BTS: 'http://localhost:8081',
                code_server: 'http://localhost:8080',
            };
            Object.keys(p).forEach(k => {
                const el = document.createElement('a');
                el.href = p[k];
                el.target = '_blank';
                el.innerText = `> ${k}`;
                box.appendChild(el);
            });
        </script>
    </body>
</html>
Sort:  

Hi @ety001 I just discovered about your steemeditor and I like it. But I couldn't login. It shows this after I put all the details needed to login. 😕
steemeditor.png

Coin Marketplace

STEEM 0.32
TRX 0.11
JST 0.034
BTC 66791.24
ETH 3239.69
USDT 1.00
SBD 4.22