Comments
Comments
Reactor is co-founded by former Apple Vision Pro technical leads Alberto Taiuti (CEO) and Bryce Schmidtchen (CTO)
The post New platform enables developers to build real-time interactive applications in just a few lines of code appeared first on TVBEurope.
Often there is an existing API called something like "Product API". It often also has /api/v1 in the path.
To me this often feels like an antipattern, especially when the API itself uses semantic versioning: mixing the routes with the API contract.
Having /v1/ in the URL while also having a major.minor.patch version: coupling the first number of the semantic version to the URL path feels…
Claude CodeをChatGPTと同じ感覚で使うと、価値の半分を捨てます。 Claude Codeは、質問に答えるチャットAIではありません。作業フォルダに入り、ファイルを読み、必要なら編集し、コマンド実行まで進めるAIです。 だから最初に覚えるべきことは、便利なプロンプトではありません。最初に作るべきものは、`CLAUDE.md`、...
Comments
In occasione della Giornata mondiale delle api del 20 maggio, la Casa di Cura Monte Imperatore di Noci, in provincia di Bari, ha rilanciato il […]
L'articolo Bee Clariane: a Noci le api intelligenti hanno monitorato la biodiversità del territorio proviene da Ambientenonsolo.
Comments
Ten years ago, we launched the Instaparser API to give developers access to the same parsing technology that powers Instapaper. Since then, the web has changed dramatically — PDFs are everywhere, LLMs need clean input, and developers need structured content more than ever. Today, we’re relaunching Instaparser with three APIs built and refined on Instapaperweiterlesen
書類の写真や古文書の画像データを入力するだけでテキストデータとして文字起こしできるウェブアプリが「NDLOCR-Lite Web AI」です。NDLOCR-Lite Web AIは2026年2月に国立国会図書館のNDLラボが公開して話題となった「NDLOCR-Lite」の派生アプリで、インストール操作不要でウェブブラウザからアクセスするだけで使用可能...
I don’t think it’s necessary to introduce Gregor Hohpe. I’m a big fan, having read Enterprise Integration Patterns, and I’ve recommended the book ever since. When I spoke at the Software Architecture Gathering in 2024, I was fortunate enough to meet him and purchase this book. I’m the happy owner of a signed copy. Modern architects don’t try to be the smartest people in the room–they make…
Evan as a skeptic, I will admit, it was interesting to hear about how Claude Code was created and how it is being developed now in this interview with its creator Boris Cherny:
Cherny’s instructions to build for the model they will have in six months, coupled with the seeming lack of understanding of what model they will have in six months (either software development goes away or an ASL-4 level…
こんにちは、Hohetoです。 筆者の最近のお仕事(マーケット分析・投資戦略作成・bot開発など)の大部分はClaude Codeと一緒に行うようになっています。 ※この記事はちゃんと人間が書いています。 最近になってようやく知見が溜まってきたので、本記事ではそのTipsをまとめました。ご自身の環境や分析手法に合わせて使え...
Comments
Dev Log 38: 2025-12-18
Dev Log 38: 2025-12-18
マストドンのクライアントアプリに翻訳機能を追加するため、「みんなの自動翻訳」というAPIを見つけたので試してみた。
最初に実装結果
<iframe src="https://social.nove-b.dev/@nove_b/113854236337930111/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://social.nove-b.dev/embed.js" async="async"></script>
<br…
I tested OpenProps, Bulma, and TailwindCSS while migrating to Bridgetown, and found they fall on a revealing continuum from pure CSS custom properties to all-in utility classes. Here's what I learned about each approach.
Deploying a Bridgetown site with Kamal? Watch out for a sneaky Tailwind bug. When the jit-refresh.css file is gitignored, fresh checkouts fail silently during the build process, stripping all your Tailwind styles. Here's how to fix it with a simple esbuild plugin instead of patching your Dockerfile.
Here's a technique I use to model API responses in a simple class. This provides nice ergonomics with minimal boilerplate.
タイトルにあるようにSwaggerで作成したいのであれば、yamlを作成すればいい。
だけど、そんなことをするのは面倒くさい。
というのもNestJsではデコレーターを追加するだけで自動でSwagger UIを作成してくれた。
そこでGoでも同様な手順で実現できるライブラリを探してみた。
swaggo/swag
swaggo/swagを使えばできそうだったので試してみた。
インストール
アノテーションを作成する
main.goにアノテーションを追加する。
記入後にswag initを実行する。
すると上記ファイルたちが生成される。
UIで確認する
これがいまいちわかなかったので、https://editor.swagger.io/に生成されたyamlファイルをコピペして見る方法にしているけど、localhost:18080/api/v1で見られるんだと思われる。
…
期待するもの
新規登録のAPIを作成したので、次はログイン機能を作成したい。
ログインは、メールアドレスとパスワードを送り一致したら、tokenを取得する。
で、tokenを使って認証付きのAPIを叩けるようになりたい。
tokenにはjwtを使用する。
jwtってなに?
これはどこかで調べてまとめる(気が向いた時)。
JWT認証を作成する
パッケージのインストール
github.com/dgrijalva/jwt-goパッケージの情報が多かったので、それに従うことにする。長い物には巻かれるべきで間違いない。
パッケージをインストールする。
Tokenを生成する
まずjwt.goというファイルを作成する。
今回はauthフォルダの中に作成した。
それでは書いていく。
まずは、jwtを生成するためのシークレットキーを作成する。
ここでは任意の文字列(今回は"y…
いたるまで
ディレクトリ構成
上記のように作成した。
簡単に説明すると、
db/db.go
データベースとの接続が行われる。
handlers/handlers.go
HTTP…
Go LangでWebAPIを作成するために、GolangでエンドポイントにアクセスしDBからデータを取得するでデータ取得の処理は確認できた。
リファクタリング
次に現状、main.goにすべての記述をしていたが、それぞれ簡単に責務ごとにフォルダを分けることにした。
分け方は、下記の通り。
db フォルダ:
handlers フォルダ:
でDBと接続することはできたし、サーバーを立ち上げることに成功した。
User情報を取得するAPIを作成する
次は、特定のエンドポイントにアクセスした際に、DBからデータを取得する。
具体的にはhttp://localhost:8081/usrsにアクセスした際にusersテーブルのデータを取得できるようにしたい。
エンドポイントを作成する
まずはhttp://localhost:8081/usrsのエンドポイントを作成する。
handleRequestsをmain関数の中で実行すればhttp://localhost:8081/usrsにアクセスした際に
と表示されるようになった。
ちになみに、
…
net/httpでサーバーを立ち上げる
DBと接続することはできたので、次はエンドポイント作成のためサーバーを立ち上げる。
サーバーを構築する組み込みのパッケージが用意されているので、そちらを使用する。
net/http
インストールの仕方がないとか思っていたけど、組み込み、つまり標準装備なので特にインストールは必要なく、importすれば使用可能だった。
で、
上記をmain.goに記載したうえで、$ go run src/main.goを実行する。
に訪れると、
が表示されている。これでサーバー立ち上げの確認ができた。
HeidiSQLでSQLを実行する
次に、Go LangでWebAPIを作成するために、まずはDockerでMySQLを構築するで作ったMySQLにデータベースを作成する。HeidiSQLから作成しようとするが、
という権限エラーが出るようになった。
に変更したらできた。ちょっと理由はわからない。
で、projectというデータベースでSQLを実行する。
これでSampleのテーブルを作成することが出来た。
GoLangでテーブルを作成する
次にGORMをインストールする。
を実行すると、
更新された。
上のふたつは謎だけど、それっぽいのは入ってきた。
よく考えたらMySQLを使用するので、
だった。
ちなみに不要パッケージの削除方法はわからなかった。(要調査)
main.goに下記をコピペ。
これで実行すると
作成したDBにusersテーブルが作成された。…
普段フロントエンドをメインとしているので、バックエンドの環境構築に疎い。 今まではFirebaseを使用することが多く、前回はじめてNestJSで本格的にバックエンドの構築をした。 とは言えNestJSはJavascriptである。
Windows11に入れたMySQLとNest.Jsを接続し、テーブルを作成する
難しかったけど、新しいことに挑戦した感じがしなかった。 しかもその時、とにかく早く実装したかったので、MySQLをWindowsにインストールしたうえでテストしていた。
実際の案件ではそんなことありえないので、しっかりDockerで環境を構築し、言語はGo Langを採用することにした。
まずはDockerでMySQLを構築する
docker-compose.yaml を作成する
で、docker-compose up…
For a while now I've had a line on my homepage displaying the track I'm currently listening to via Last.fm. In the interest of taking things entirely too far I've expanded what it does a fair bit.
I've written before about displaying my listening data from Apple Music but, recently, I've attempted to take things a bit further.
Up until now my now page has sourced music data from Last.fm (and may well again). But, in the interest in experimenting a bit, I've tried my hand at rewriting that part of the page to leverage data from Apple Music, using MusicKit.js instead.