|
|
@ -5,7 +5,6 @@ const fetch = require("node-fetch");
|
|
|
|
|
|
|
|
|
|
|
|
app.get("/", (request, response) => {
|
|
|
|
app.get("/", (request, response) => {
|
|
|
|
response.writeHead(200, { "Content-Type": "application/json" });
|
|
|
|
response.writeHead(200, { "Content-Type": "application/json" });
|
|
|
|
const term = "漢字";
|
|
|
|
|
|
|
|
fetch("https://tatoeba.org/en/api_v0/search" + request.url.substring(request.url.indexOf("?")))
|
|
|
|
fetch("https://tatoeba.org/en/api_v0/search" + request.url.substring(request.url.indexOf("?")))
|
|
|
|
.then(response => response.text())
|
|
|
|
.then(response => response.text())
|
|
|
|
.then(body => {
|
|
|
|
.then(body => {
|
|
|
|