What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-05 13:14:02
knex migrate in docker compose
"use strict"; const config = require("./knexfile"); const Knex = require("knex"); const knex = Knex(config); async function runMigrations(retries, delay) { for (let i = 1; i !== retries; i++) { try { return awa... Add solution -
TypeScript 2021-09-05 09:34:02
modal controller get data on dismiss
selectUser(user: User):void { this.modalController.dismiss(user); } ... async openUserModal() { const modal = await this.modalCtrl.create({ component: UserModalComponent, componentProps: { users: this.users }, }); modal.onDidDis... Add solution -
Javascript 2021-09-03 15:19:02
promise catch javascript
//create a Promise var p1 = new Promise(function(resolve, reject) { resolve("Success"); }); //Execute the body of the promise which call resolve //So it execute then, inside then there's a throw //that get capture by catch p1.then(function(va... Add solution -
Javascript 2021-09-03 14:11:02
how to send post request js fetch
componentDidMount() { // Simple POST request with a JSON body using fetch const requestOptions = { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ title: 'React POST Request Example' ... Add solution -
TypeScript 2021-09-03 13:22:01
firestore get all documents in collection
// retrieve a collection db.collection('documents') .get() .then(querySnapshot => { const documents = querySnapshot.docs.map(doc => doc.data()) // do something with documents }) // retrieve a document db.collection('documents') .doc... Add solution