node でさっくりと TypeScript を実行したいときに、babel なり webpack なりで transpile して実行するのは不便です。しかも型が考慮されなくなってしまいますね。 そういうときは ts-node を使うことで、バベってファイルを生成してから食わせずとも、そのまま実行できるので手軽です。型も考慮されます。 使い方 さっくりと依存を追加します:
Vosk is an offline open source speech recognition toolkit. It enables speech recognition for 20+ languages and dialects - English, Indian English, German, French, Spanish, Portuguese, Chinese, Russian, Turkish, Vietnamese, Italian, Dutch, Catalan, Arabic, Greek, Farsi, Filipino, Ukrainian, Kazakh, Swedish, Japanese, Esperanto, Hindi, Czech, Polish. More to come. Vosk models are small (50 Mb) but p
Neboa (pronounced /ˈnɛβo̯a̝/, from Galician: «fog») is a simple, yet powerful, type-safe NoSQL database library for Node.js. It offers seamless data management with compile-time type-checking for enhanced reliability. Leveraging SQLite, Neboa ensures efficient and lightweight performance, making it perfect for Electron and other platforms. With its unique approach, Neboa empowers you to use a rela
mizchi/minlink: Minimum(> 1kb) and isomorphic worker wrapper with comlink like rpc. というライブラリを作った。自分で使ってみて、とても便利だったので紹介する。 概要 Browser WebWorker / Node worker_threads を同じ API でラップして、関数呼び出しのように使える Magical なことをしない軽量 comlink みたいなもの 双方向で API をラップできる Web Worker を使う思想的な背景は off-the-main-thread の時代 - mizchi's blog にて。 使い方: Browser WebWorker をラップする。 // browser worker.js import { expose } from "minlink/dist/b
.NET 7ではWebAssembly製.NETランタイムを単独で利用可能にし、WebブラウザやNode.jsなどでJavaScriptから.NETを簡単に呼び出せるように マイクロソフトはWebブラウザ上でC#などで書かれた.NETのWebアプリケーションを実行できる「Blazor WebAssembly」を2020年5月にリリースしています。 Blazor WebAssemblyは、WebAssembly製の.NETランタイムを用いることでWebブラウザ上で.NETアプリケーションの実行を可能にしています。 参考:[速報」Blazor WebAssemblyが正式リリース。C#/.NETでWebアプリケーションを開発可能に。Microsoft Build 2020 今年の11月に正式リリースが予定されている「.NET 7」では、このWebAssembly製.NETランタイムを単独で使え
Unofficial, Reverse-Engineered Node.js/TypeScript client for Meta's Threads. Warning As of September 8, 2023, the development of the "threads-api" project have been halted and discontinued due to communication received from Meta Platforms, Inc. (“Meta,” previously known as Facebook, Inc.). This repository, along with related projects threads-py and react-threads, has been archived and will no long
Node.js Web アプリケーションを Docker 化する この例の目的は、Node.js アプリケーションを Docker コンテナに取り込む方法を説明することです。 このガイドは開発を目的としており、 本番展開を目的としていません。 このガイドでは、正常に Docker がインストールされ、 Node.js アプリケーションがどのように構成されているかについての基本的な知識があることも前提としています。 このガイドの最初の部分では、Node.js で単純な Web アプリケーションを作成してから、 そのアプリケーション用の Docker イメージを作成し、 最後にそのイメージをコンテナとして実行します。 Docker を使用すると、ソフトウェア開発用に、コンテナと呼ばれる標準化された単位に すべての依存関係を持つアプリケーションをパッケージ化できます。 コンテナは、Linux オ
こんにちはGAOGAOの代表をしております @tejitak です。GAOGAOアドベントカレンダー 17日目の記事です。GAOGAOのスタートアップスタジオにて、最近お手伝いしている海外のお客様案件にてTypeORMを導入しています。 今回の記事では、TypeORMとはなんぞや?という方を対象として、まだ比較的日本語記事が少ないTypeORMについてのご紹介します。 Node.jsのORM Node.jsでサーバーサイドを実装する際にはExpressを使うことが多いと思います。ExpressはサーバーサイドのWebフレームワークで、データベースを扱うORMは自由に導入することができます。以下代表的なORMを紹介します。 mongoose 公式ドキュメント: https://mongoosejs.com/ MongoDBはJavaScriptとの相性の良さから昔からNode.jsの多くのプ
弊社HiCustomerは、2021年のすごいベンチャー100に選ばれました。小田です。皆様今年もよろしくお願いいたします。直近の報告ですが、私はちょくちょくKafkaJSと遊んでおります。もうAWS SQSやCloud Pub/Subには戻れない身体になりそうで、タイミングをみてConfluent社の株を買っちゃいそうです。ギャンブラーとしてAll-inしちゃおうかな😜 最近のNode.jsのORM事情について 本題ですが、最近SaaSの新規案件を始める関係でORM周りライブラリの技術調査をしています。ちなみに環境と要件は以下です。 環境は以下: データストアはPostgreSQL 言語はTypeScript ラインタイムはNode.js 要件は以下: スキーマファーストで実装できる 可能であればスキーマを書いて型とコードが生成できる クエリに対応する関数をいい感じに型付けできる 複雑
工学社が「はじめてのNode-RED MCU Edition ビジュアルプログラミングでマイコンを動かそう!」を発刊する。同書は、IoTデバイスとの相性が良くものづくりに適したプログラミング開発ツール「Node-RED MCU Edition」の導入から工作例までを解説する。 「Node-RED」はオープンソースプロジェクトとして開発されているフローベースのビジュアルプログラミング開発ツールだ。 Node-RED MCU EditionはUIや画像の表示、音声の再生、センサーデバイス、ネットワーク通信機能などをサポートしたJavaScript開発プラットフォーム「Moddable SDK」上で動作。IoTデバイスとの相性に優れる。JavaScriptによるプログラムの他に、Node-REDのフローエディタを使ったビジュアルプログラミングもできるため、初心者でも容易にプログラミングできるのが
はじめに こんにちは。APP/UXグループの大谷と申します。 寒くなってきてグラコロが美味しい季節ですね。年がわりで発売されるデミグラスソースがかかっているバージョンより、ノーマルバージョンのグラコロが個人的には好みです。 バージョンといえば先日Node.jsのバージョンを更新した際に困ったことについて書いていきたいと思います。 何が起きたか 弊社では一部の機能の画面をNuxtを使って提供しており、server middlewareをBFFとして利用しAPIリクエストはserver middlewareを経由して投げられています。 (詳しい構成についてはこちらの記事に添付の資料をご参照ください) 今回はNode.jsのバージョンを v12 → v14 → v16に段階的に更新する作業をおこなっていました。(バージョンが一部歯抜けになっているのは依存関係の解消の関係でやりやすかったバージョン
ESLint、Prettierなどは--cacheフラグという一度チェックしたファイルは、ファイルが変更されるまで再チェックしないキャッシュの仕組みを実装しています。 同様の仕組みをtextlintを実装したことはありますが、file-entry-cacheを使い結構煩雑な実装が必要になります。ファイル変更を元に処理結果をキャッシュする仕組みはある程度定型化されているのに、毎回同じような実装をツールごとに書くのは微妙だなと思ったので、ライブラリを書きました。 azu/file-cache: Node.js library that provide a cache for file metadata or file content. --cacheフラグの仕組み --cacheフラグの仕組みとしては、ファイルの内容のハッシュ値 or ファイルの更新時刻をキャッシュファイルとして保存して置きま
Node.js で X(Twitter)、Bluesky、Mastodon に JSON データから同時投稿(クロスポスト)する JSON データから X(Twitter)、Bluesky、Mastodon などの SNS にクロスポストする JavaScript(Node.js)を書いてみたので GitHub で公開しました。 私事ながら、現状、SNS としては X (旧 Twitter)、Bluesky、Mastodon を日常的に使っていて (Threads と Nostr も使っていますが特に Threads は放置気味......)、全部じゃないにしても、一部の投稿については、これらすべてのサービスに同時投稿したいなと、なんとなく思っていました。 巷にはそういう Web サービスも探せばあるとは思うんですが、なるべく自前でやろうということで、週末に思い立って手を付けたら見事に週末
イギリスのSF作家スティーヴン・バクスターの最新作『Creation Node』を読みました。壮大なファースト・コンタクトSFであり、また、従来のSFを批判的に検証するメタ・ファースト・コンタクトSFでもありました。 Creation Node (English Edition) 作者:Baxter, Stephen Gollancz Amazon さらに、タイトルにも書いているようにアニメ『魔法少女まどかマギカ』と共通する展開もあって、非常に興味深かったです。 バクスターを洋書で読んでいる人は、日本でそれほどいないと思うため、記録しておきます。現代日本SF作家のなかで頭角を現すために、バクスターの最新作を読んでいることをアピールしたいと思います。今年の九月に発売されたばかりなので、日本語圏では最速レビューだと思われます。願わくば、これを機に未訳SFをどんどん紹介して、「未訳SFインフルエ
JSer.info #458 - Node.js 12.13.0がリリースされました。 Node v12.13.0 (LTS) | Node.js Node.js 12.xのLTS(Long Term Support)となるバージョンで、Node.js 12.xは2022年4月までメンテナンスされます。 現在のLTSは8.x、10.x、12.xの3つとなり、8.xは2019年の12月でサポート終了となる予定です。 nodejs/Release: Node.js Foundation Release Working Group AWS Lambdaでは、Node.js 8.10の利用を非推奨にして廃止までのスケジュールがアナウンスされています。 Node.js 8.10 is EOL, please migrate your functions to a newer runtime vers
Opens in a new windowOpens an external siteOpens an external site in a new window The Shopify CLI (command line interface) is an essential tool for developers when building and deploying Themes, Apps, Hydrogen storefronts on the Shopify platform. It provides workflows to create new projects that follow best practices, integrate with the platform during development, and distribute the production ar
CX事業本部@大阪の岩田です。 先日のブログでPythonのライブラリLambda Powertoolsについてご紹介しました。今日はNode.jsのLambda向けに色々な便利機能を提供してくれるDAZN Lambda Powertoolsについてご紹介します。 環境 今回利用した環境です ランタイム: Node.js 12.x dazn-lambda-powertools-layer: 1.15.6 DAZN Lambda Powertoolsとは? Node.jsで利用できるAWS Lambda用のミドルウェアを集めたライブラリです。GitHubのリポジトリはこちらです。 https://github.com/getndazn/dazn-lambda-powertools 概要についてはREADMEに貼られている以下の画像を見て頂くのが分かり良いですが、 構造化ログ(JSONログ)の
Node.js をプロフェッショナルとして使用する場合に、パフォーマンス速度とシステム コールの互換性が重要であると考えていて、Linux ワークスペースを活用する Docker コンテナーを実行し、Linux と Windows の両方のビルド スクリプトを管理する必要がないようにしたい場合、Linux 用 Windows サブシステム (より具体的には WSL 2) 上に Node.js をインストールしてください。 Linux 用 Windows サブシステム (WSL) を使用すると、好みの Linux ディストリビューション (Ubuntu が既定) をインストールできるため、開発環境 (コードを作成する場所) と実稼働環境 (コードが配置されるサーバー) との間に一貫性を持たせることができます。 WSL 2 のインストール WSL 2 は Windows で利用可能な最新バージ
The author selected the COVID-19 Relief Fund to receive a donation as part of the Write for DOnations program. Introduction A buffer is a space in memory (typically RAM) that stores binary data. In Node.js, we can access these spaces of memory with the built-in Buffer class. Buffers store a sequence of integers, similar to an array in JavaScript. Unlike arrays, you cannot change the size of a buff
Notable changes deps: Update npm to 6.10.3 (isaacs) #29023 fs: Add recursive option to rmdir() (cjihrig) #29168 Allow passing true to emitClose option (Giorgos Ntemiris) #29212 Add *timeNs properties to BigInt Stats objects (Joyee Cheung) #21387 net: Allow reading data into a static buffer (Brian White) #25436 Commits [293c9f0d75] - bootstrap: run preload prior to frozen-intrinsics (Bradley Farias
The author selected the Free Software Foundation to receive a donation as part of the Write for DOnations program. Introduction When the browser loads a page, it executes a lot of code to render the content. The code could be from the same origin as the root document, or a different origin. By default, the browser does not distinguish between the two and executes any code requested by a page regar
We're excited to announce the release of Node.js 22! Highlights include require()ing ES modules, a WebSocket client, updates of the V8 JavaScript engine, and more! Node.js 22 will enter long-term support (LTS) in October, but until then, it will be the "Current" release for the next six months. We encourage you to explore the new features and benefits offered by this latest release and evaluate th
// pages/api/user/[id].ts import type { NextApiRequest, NextApiResponse } from "next"; import { createRouter, expressWrapper } from "next-connect"; import cors from "cors"; const router = createRouter<NextApiRequest, NextApiResponse>(); router // Use express middleware in next-connect with expressWrapper function .use(expressWrapper(passport.session())) // A middleware example .use(async (req, res
JSer.info #601 - Node.js 18.6.0がリリースされました。 Node v18.6.0 (Current) | Node.js Node.js 18.6.0ではexperimentalで実装されている--loaderの挙動の変更が含まれています。 複数の--loaderを指定した場合の順番を変更。またloaderの実装はshortCircuitを返すのが必須となっています。 そのため、すでに公開されているloaderが動かなくなっている場合があります。 詳しくは、次のIssueと記事で解説されています。 esm: add chaining to loaders by JakobJingleheimer · Pull Request #42623 · nodejs/node Custom ESM loaders: Who, what, when, where, why
Electronフレームワーク、Node.jsなどの開発をホストする「OpenJS Foundation」に合流 HTML、CSS、JavaScriptなどのWebテクノロジーを用いてWindows、macOS、Linuxなどに対応したアプリケーションを開発可能なElectronフレームワークが、OpenJS Foundationのインキュベーションプログラムとして合流したことが発表されました。 Great news! Electron is joining the @openjsf as an incubation program, a move we're excited about. Read more about it here: https://t.co/iOTXCcFHxD pic.twitter.com/mmge6SUeSP — Electron (@electronjs)
We’re excited to announce that starting today, Deno Deploy supports importing Node.js built-in modules such as http, fs, and path. You can now run existing Node.js apps at the edge. Deno Deploy is a next-generation cloud platform built on JavaScript isolates. It runs your JavaScript, TypeScript, and WebAssembly at the edge, in our 35 global regions, close to your users. It scales automatically, fr
Makes node_modules/ happen. Fast. No fuss. Orogene is a next-generation package manager for tools that use node_modules/, such as bundlers, CLI tools, and Node.js-based applications. It's fast, robust, and meant to be easily integrated into your workflows such that you never have to worry about whether your node_modules/ is up to date. It even deduplicates your dependencies using a central store,
Enhanced REPL experience for Node.js in Notebooks (with top level awaits) Run & debug JavaScript, TypeScript code in node.js Built in support for typescript (ships with TypeScript & ts-node). Built in support for plotly (plotly.js is shipped with the extension) Rich (inline visualizations) using @tensorflow/tfjs-vis & Tensorboards Excellent support for danfo.js (rich HTML output and plots) Excelle
Node.js での devServer の構築では初手 unjs/get-port-please の導入が便利2022/11/14 業務で複数の devServer を同時に立ち上げたいケースがあり、チーム内で「React.jsプロジェクト(APP_A)を起動してからNext.jsプロジェクト(APP_B)を起動するとNextが気を利かせてくれるが、Nextを起動してからReactだとポートが専有されていてエラーになっていて地味に不便」という声が上がっていた。 かねてから課題ではあったものの、それぞれ実装を進めることから、同時に立ち上げる機会がそこまで多くなくこれまで放置されていた。しかしそうは言っても不便ではあった中、get-port-please の存在を思い出したので試しに導入してみることにした。 結果として、好感触でなかなか良いライブラリだったので本記事で紹介したいと思う。 un
Notable Changes Deprecations and Removals (SEMVER-MAJOR) fs: remove permissive rmdir recursive (Antoine du Hamel) #37216 (SEMVER-MAJOR) fs: runtime deprecate rmdir recursive option (Antoine du Hamel) #37302 (SEMVER-MAJOR) lib: runtime deprecate access to process.binding('http_parser') (James M Snell) #37813 (SEMVER-MAJOR) lib: runtime deprecate access to process.binding('url') (James M Snell) #377
العربية Catalan Deutsch English Español زبان فارسی Français Galego Italiano 日本語 ქართული 한국어 Nederlands Português do Brasil limba română Русский Türkçe Українська 简体中文 繁體中文 This release marks the transition of Node.js 12.x into Long Term Support (LTS) with the codename 'Erbium'. The 12.x release line now moves into "Active LTS" and will remain so until October 2020. After that time, it will move in
えっ このネタ続くの。。? 前回( Unity WebGLで使われているシェーダを抜き出してARBアセンブリを眺める )はWebGLビルドのUnityゲームをトレースして、使われているシェーダ命令があんまり多くないことを確認した。 ブラウザ上の動作では同期APIの実装に制約がありちょっと手を入れづらいため、Node.jsで動かしたかった。別案としてNW.jsを使うというのもあったが、今回の手法でもWebブラウザ側のDOMを使わないといけないところは一応クリアしている。 結果と手法 結局成功したんだか失敗したんだかよくわからないところまでは来たと思う。 結果 Node.jsでもUnity WebGLは起動して描画コマンドも発行する でも描画がまっくらなので、まだ描画が正常かどうかは確認できていない JSdomでWebAssemblyを使ったサイトがそのまま動くのは地味にすごい気はする。 手法
開発 CloudFunctionsのNode.jsで「Function cannot be initialized」が発生する原因と対策 Googleのクラウド環境上で仮想サーバーの設定をせずにサーバーレスでプログラムを実行できるCloudFuntions。 CloudFuntionsではいくつかのプログラム言語を利用できるが、その中のひとつ「Node.js」を使っていると、デプロイ時にあるエラーに遭遇することがある。 Function cannot be initialized 初期化エラーのようだがエラーメッセージを見ても対策がわからない。 そこで今回は、CloudFunctionsのNode.jsで「Function cannot be initialized」が発生する原因と対策について解説する。
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く