What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-20 02:58:03
getdata from fetch api into variable
<script> function getFromAPI(url, callback){ var obj; fetch(url) .then(res => res.json()) .then(data => obj = data) .then(() => callback(obj)) } getFromAPI('https://jsonplaceholder.typicode.com/posts', getData); function ... Add solution -
Javascript 2021-09-17 20:40:02
react eznyme fetch api using hooks
//app.js import React from 'react' import FetchData from './FetchData' const fetchUsers = () => fetch('https://jsonplaceholder.typicode.com/users').then((res) => res.json()) function App() { return ( <> <FetchData fetchUsers={... Add solution -
Javascript 2021-09-17 15:24:03
app use body parser
var express = require('express') var app = express() app.use(express.json()) // for parsing application/json app.use(express.urlencoded({ extended: true })) // for parsing application/x-www-form-urlencoded app.post('/profile', function (req, res, next)... Add solution -
Javascript 2021-09-11 05:57:02
facebook integration in node.js
const request = require('request-promise'); module.exports = (app) => { // you'll need to have requested 'user_about_me' permissions // in order to get 'quotes' and 'about' fields from search const userFieldSet = 'name, link, is_verified, pictu... Add solution -
Javascript 2021-09-09 10:36:02
export mongo to csv node
const json2csv = require('json2csv').parse; //For unique file name const dateTime = new Date().toISOString().slice(-24).replace(/\D/g, '').slice(0, 14); const filePath = path.join(__dirname, "../../../", "public", "exports&quo... Add solution