Reputation: 80
so I have this simple file whois.js
:
It's pretty simple, in node it works and in bun just runs forever. In the image it shows the return in node and the time it took until I forced cancelled the process in bun.
I don't really know what else to put in the question, if you need any more information please comment and I'll provide.
Upvotes: -4
Views: 436
Reputation: 616
Gave it a try and everything works as expected on Linux at least. Are you sure it is not something to do with some config on your system or some issues with bun installation?
elvis@ubuntu:~/test$ bun run index.ts
{
"2023_11_06T20": "23:15-03:00 - IP: 2.131.246.11",
domain: "virtu.com.br",
owner: "Virtu Assessoria Empresarial ltda",
ownerid: "67.643.882/0001-84",
responsible: "Marcio Antonio Rosconi",
country: "BR BR BR",
ownerC: "TRA56",
techC: "MAARO1014",
nserver: "ns1.locaweb.com.br ns2.locaweb.com.br ns3.locaweb.com.br",
nsstat: "20231106 AA 20231106 AA 20231106 AA",
nslastaa: "20231106 20231106 20231106",
created: "20051017 #2425251 20041117 20191107",
changed: "20221018 20230920 20201005",
expires: "20321017",
status: "published",
nicHdlBr: "TRA56 MAARO1014",
person: "Talles Rodrigues Alves marcio antonio rosconi",
eMail: "[email protected] [email protected]",
ofQueriesAre: "domain (.br), registrant (tax ID), ticket,"
}
Upvotes: 1
Reputation: 1123
Make sure you install express types npm install @types/express
and in your .ts file import {Application} from 'express'
Your code would look like this:
import { Application } from "express";
import userController from "./userController.js"
import getController from "./getController.js"
import productController from "./productController.js"
const exportArr = [userController, getController, productController]
export default (app: Application) => {
exportArr.forEach(controller => controller(app))
}
Upvotes: 2