fsfgdsgdfgsdfg commited on
Commit
94edc0b
·
verified ·
1 Parent(s): 9a81501

Update src/main.tsx

Browse files
Files changed (1) hide show
  1. src/main.tsx +11 -12
src/main.tsx CHANGED
@@ -1,6 +1,6 @@
1
- import { Hono } from 'hono';
2
- import { logger } from 'hono/logger';
3
- import { serveStatic } from 'hono/deno';
4
  import { Layout } from './layouts/layout.tsx';
5
  import { getLatestVideo } from './lucinda.ts';
6
  import { HuggingFace } from './huggingface.ts';
@@ -74,19 +74,18 @@ app.get('/', async (c) => {
74
  );
75
  });
76
 
77
- Deno.serve({ port: 7860 }, app.fetch);
78
 
79
- const hf = new HuggingFace(Deno.env.get('HF_COOKIE')!);
80
- const count = await hf.followRandomUsers('meta-llama');
81
- console.log('Number of users followed:', count);
82
 
83
- Deno.cron('follow', '32 17 * * *', () => {
84
- // follow
85
- console.log('hello');
 
86
  });
87
 
88
  Deno.cron('test', '0 * * * *', async () => {
89
- console.log('Testing cron job hfgfsghfghhfgssfgh');
90
  const host = 'https://' + Deno.env.get('SPACE_HOST');
91
- await fetch(host, { method: 'skibidi' });
 
92
  });
 
1
+ import { Hono } from '@hono/hono';
2
+ import { logger } from '@hono/hono/logger';
3
+ import { serveStatic } from '@hono/hono/deno';
4
  import { Layout } from './layouts/layout.tsx';
5
  import { getLatestVideo } from './lucinda.ts';
6
  import { HuggingFace } from './huggingface.ts';
 
74
  );
75
  });
76
 
77
+ app.post('/', (c) => c.text('ok'));
78
 
79
+ Deno.serve({ port: 7860 }, app.fetch);
 
 
80
 
81
+ Deno.cron('follow', '0 0 * * *', async () => {
82
+ const hf = new HuggingFace(Deno.env.get('HF_COOKIE')!);
83
+ const count = await hf.followRandomUsers('meta-llama');
84
+ console.log('Number of users followed:', count);
85
  });
86
 
87
  Deno.cron('test', '0 * * * *', async () => {
 
88
  const host = 'https://' + Deno.env.get('SPACE_HOST');
89
+ const res = await fetch(host, { method: 'POST' });
90
+ console.log(await res.text());
91
  });