fetch()を使用してフロントエンドでデータを収集していましたが、現在はバックエンド(node.jsを使用)で同じことを行っていますが、私は私のエクスプレスルートfetch(`/api/users/${userstate.username}`)
ノード内のfetch()と同様の機能
フェッチだからだエラー
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: only absolute urls are supported
同じようなフェッチ返すノード内の機能はありますか?
「http:// localhost:port/api/...」については、http://stackoverflow.com/questions/37725659/fetching-in-javascript-with-absolute-url-and-relative-url – mplungjan
ああ、あなたは正しい...私はそんなことを解決するとは思わなかった、ありがとう! – Kevin
https://www.google.com/search?q=node+call+api+on+same+server – mplungjan