This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from 'react'; | |
const usePolling = (url, interval = 5000) => { | |
const [data, setData] = useState(null); | |
const [isFetching, setIsFetching] = useState(true); | |
useEffect(() => { | |
let isMounted = true; | |
let timerId; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use borsh::{BorshSerialize, BorshDeserialize}; | |
use solana_program::{ | |
account_info::{next_account_info, AccountInfo}, | |
entrypoint, | |
msg, | |
entrypoint::ProgramResult, | |
program_error::ProgramError, | |
pubkey::Pubkey, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use borsh::{BorshSerialize, BorshDeserialize}; | |
use solana_program::{ | |
account_info::{next_account_info, AccountInfo}, | |
entrypoint, | |
msg, | |
entrypoint::ProgramResult, | |
program_error::ProgramError, | |
pubkey::Pubkey, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const app = express(); | |
const port = 3000; | |
app.get('/v1/health', (req, res) => { | |
res.send('Hello, Clockwise software!'); | |
}); | |
app.listen(port, () => { | |
console.log(`Server running on http://localhost:${port}`); |