What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-17 16:55:10
polkadot UnhandledPromiseRejectionWarning: Error: Api needs to be initialized before using, listen on 'ready'
import { ApiRx } from '@polkadot/api'; // initialise via static create const api = await ApiRx.create().toPromise(); // make a call to retrieve the current network head api.rpc.chain.subscribeNewHeads().subscribe((header) => { console.log(`Chain is... Add solution -
Javascript 2021-11-15 18:43:10
set proxy to use nodejs in angular
// in NodeJS (3000 port) make: app.get('/api/user', (req, res) => { res.json({}); }); // in Angular (4200 port): // make call async ngOnInit(): Promise<void> { let result = await this.http.get("http://127.0.0.1:4200/api/user").to... Add solution -
TypeScript 2021-10-28 09:40:12
pub schedule firebase
import {EventContext} from 'firebase-functions'; // There is an allowance of three free jobs per Google account // For example, to run a function every five minutes with // AppEngine cron.yaml syntax, do something like this: export const scheduledFunct... Add solution -
Other 2021-09-17 03:45:02
aws amplify cli set environment variable
const aws = require('aws-sdk'); exports.handler = async () => { const { Parameters } = await (new aws.SSM()) .getParameters({ Names: ["SECRET_TOKEN"].map(secretName => process.env[secretName]), WithDecryption: true, ... Add solution