improve
This commit is contained in:
parent
f681973db3
commit
8f22a3881a
11
server.js
11
server.js
@ -7,7 +7,10 @@ const cron = require("node-cron");
|
||||
const { createClient } = require("@supabase/supabase-js");
|
||||
|
||||
// Setup
|
||||
const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_ANON_KEY);
|
||||
const supabase = createClient(
|
||||
"https://supabase.dev3vds1.link",
|
||||
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJzdXBhYmFzZSIsImlhdCI6MTczODIyODg2MCwiZXhwIjo0ODkzOTAyNDYwLCJyb2xlIjoiYW5vbiJ9.QZCW7j6MD6RzJheDuDC8X2ecum97LH5fQKdPnyYFzL4"
|
||||
);
|
||||
const app = express();
|
||||
app.use(express.json());
|
||||
// Setup end
|
||||
@ -18,14 +21,14 @@ const fetchSolscanTransactions = async (page = 1) => {
|
||||
method: "get",
|
||||
url: "https://pro-api.solscan.io/v2.0/token/transfer",
|
||||
params: {
|
||||
address: process.env.TOKEN_ADDRESS,
|
||||
address: "7D1iYWfhw2cr9yBZBFE6nZaaSUvXHqG5FizFFEZwpump",
|
||||
page,
|
||||
page_size: "100",
|
||||
sort_by: "block_time",
|
||||
sort_order: "desc",
|
||||
},
|
||||
headers: {
|
||||
token: process.env.SOLSCAN_API_KEY,
|
||||
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjcmVhdGVkQXQiOjE3MzAwNDg4Njc1ODUsImVtYWlsIjoic2hpYWxvdGhAZ21haWwuY29tIiwiYWN0aW9uIjoidG9rZW4tYXBpIiwiYXBpVmVyc2lvbiI6InYyIiwiaWF0IjoxNzMwMDQ4ODY3fQ.JKKAyBvlfB68zMidRipBfXv2l-a_eEIA3gAU5wxusyQ",
|
||||
},
|
||||
};
|
||||
|
||||
@ -360,7 +363,7 @@ cron.schedule("*/1 * * * *", async () => {
|
||||
// Cron job end
|
||||
|
||||
// Start server
|
||||
app.listen(3001, () => {
|
||||
app.listen(3000, () => {
|
||||
console.log("Server running on port 3001");
|
||||
});
|
||||
// Start server end
|
||||
|
Loading…
x
Reference in New Issue
Block a user