- python の file watcher library
- 付属の cli tool
watchmedo
で nodemon みたいなことできるauto-restart
コマンドを利用する感じ
- 正直
watchdog
側は使うことなさそう
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* useEffect とかで deps array が [] でも | |
* react strict mode だと multiple rendering で 2 回走って困るので | |
* ref でなんとかするやつ | |
* | |
* @link https://www.sunapro.com/react18-strict-mode/ | |
* @link https://github.com/reactwg/react-18/discussions/18 | |
*/ | |
const initialized = useRef<boolean>(false) |
nodemon みたいなやつ、npm 使えない環境で ... と思ったけど、古い package manager が outdated で、rust の cargo ありきの install 手順しか充実してないので微妙 ... 。
https://github.com/watchexec/watchexec/releases
watchexec/watchexec#100
とりあえず ↓ を読む。
ふんわり理解だけど今んとこ 「 typescript で外部依存少なめな小さい部品を作りたい 」 なら使えそう。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { Code } from '@chakra-ui/react' | |
<Code | |
as={'pre'} | |
display={'block'} | |
padding={1} | |
overflowX={'scroll'} | |
> | |
{JSON.stringify( |
- js の error は列挙可能な prop がないので
JSON.stringify
すると{}
になる - message とか trace とかを serialize したいケースではこいつが使えそう
- あんまり star 数ない、多分 sentry とかに流すから自前実装するニーズ自体少ないのかな
この子 pure esm package なので lambda とか commonjs 環境で使えない ... 。
hello world.
- js の世界では数値は全て 64 ビットの
IEEE 754 倍精度浮動小数点数 (double)
- なんだけど
1
.123 (0.123)
みたいな省略もできる - あと
1_000
区切りとか1.23e5
指数表記とか - 意味不明だけど
+0
と-0
があって+0 === -0
は true
- なんだけど
- 変わった表現で
NaN (数値じゃない)
とInfinity, -Infinity (無限)
がある NaN === NaN
は false (こいつは比較式を false にする)
- 駐在 (daemonize) する node プロセスを「コード変更」を起点に再起動させるユーティリティ
node server.js
のようなサーバ実行コマンドでnodemon server.js
のように使う- 再起動時の signal や watch するファイルの指定など色々できる
nodemon.json
で設定を渡したりとかも可能
aws/amazon-ecs-cli - github.com
Amazon ECS コマンドラインインターフェースの使用 - docs.aws.amazon.com
【アップデート】ECSタスク定義を利用したローカル環境でのテスト実行が可能に!
- ecs のタスク定義やらなんやら cli で構成 => deploy する AaC ツール
- ローカル開発環境の構築支援 & テスト実行機能もあるらしい
- タスク定義から docker-compose.yml 作れるみたい
- あと
ecs-cli local up
みたいなコマンドで endpoint 作れるみたい