ethereum explorer

https://github.com/gobitfly/etherchain-light https://github.com/gobitfly/erc20-explorer https://github.com/carsenk/explorer https://github.com/Capgemini-AIE/ethereum-docker/tree/master/monitored-geth-client https://github.com/cubedro/eth-net-intelligence-api https://github.com/cubedro/eth-netstats Browse blocks and transactions It’s nice to have some simple analogue of Etherscan for your local chain browsing. It will be useful to examine transactions, balances, blocks and etc. It appeared that it is quite difficult to find an open-source good solution for geth. After several tries I found an acceptable solution called ETHExplorer V2. Clone it into explorer-v2 folder. To Dockerize it I had to make 2 changes. First create a Dockerfile ...

2019-07-28 · 1 min · 150 words · Me

prisma like dreamfactory

https://github.com/prisma/prisma

2019-07-27 · 1 min · word · Me

nestjs csrf

https://gitissue.com/repos/jiayisheji/blog pass csrf https://github.com/expressjs/csurf/issues/21 main.ts import { NestFactory } from '@nestjs/core'; import { NestExpressApplication } from '@nestjs/platform-express'; import { join } from 'path' import { AppModule } from './app.module'; import * as cookieSession from 'cookie-session'; import * as helmet from 'helmet'; import * as cookieParser from 'cookie-parser'; import * as csurf from 'csurf'; import * as rateLimit from 'express-rate-limit'; async function bootstrap() { const app = await NestFactory.create( AppModule, ); app.init() app.useStaticAssets(join(__dirname, '..', 'public')); app.setBaseViewsDir(join(__dirname, '..', 'views')); app.setViewEngine('pug'); app.set('trust proxy', 1); app.use(cookieSession({ name: 'session', keys: ['key1', 'key2'] })); //app.enableCors(); app.use(helmet()); app.use(cookieParser()); //app.use(csurf({ cookie: true })); //正常是這行,但有些API POST時需要略過csrf app.use(function (req, res, next) { var mw = csurf({ cookie: true }); // console.log(req.url) // check real get url if (req.url === '/testpostcsrf') return next(); //pass csrf check mw(req, res, next); }); app.use( rateLimit({ windowMs: 15 * 60 * 1000, // 15 minutes max: 100, // limit each IP to 100 requests per windowMs }), ); await app.listen(3000); } bootstrap(); layout.pug doctype html html head title= title meta(content= csrfToken, name='csrf-token') body block content login.pug extends layout block content h1 Please log in if error p. #{error} form(action="/login",method="POST") input(type="hidden",name="_csrf",value=csrfToken) input(type="hidden",name="challenge",value=challenge) table(style="") tr td input(type="email",id="email",name="email",placeholder="email@foobar.com") td. (Example: "foo@bar.com") tr td input(type="password",id="password",name="password") td. (Example: "foobar") input(type="checkbox",id="remember",name="remember",value="1") label(for="remember") Remember me br input(type="submit",id="accept",value="Log in")

2019-07-25 · 1 min · 206 words · Me

nest.js 让我们用Nestjs来重写一个CNode

https://gitissue.com/repos/jiayisheji/blog 這網站中的 让我们用Nestjs来重写一个CNode(上、中、下) 幫了大忙,減少大量的浪費時間 =========== html -> jade/pug http://html2jade.aaron-powell.com/ when you html meta want to become jade/pug layout.pug meta(content= csrfToken, name='csrf-token')

2019-07-25 · 1 min · 21 words · Me

nodejs expressjs

https://expressjs.com/en/advanced/best-practice-security.html

2019-07-23 · 1 min · word · Me