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 fs = require("fs"); | |
const bundle = fs.readFileSync("path-to-webpack-bundle.html", "utf8"); | |
const escaped = JSON.stringify(bundle); | |
const js = `export default ${escaped}`; | |
fs.writeFileSync("javascript-output-file.ts", js); |
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
<?php | |
$url = "https://fcm.googleapis.com/fcm/send"; | |
$token = "your device token"; | |
$serverKey = 'your server token of FCM project'; | |
$title = "Notification title"; | |
$body = "Hello I am from Your php server"; | |
$notification = array('title' =>$title , 'text' => $body, 'sound' => 'default', 'badge' => '1'); | |
$arrayToSend = array('to' => $token, 'notification' => $notification,'priority'=>'high'); | |
$json = json_encode($arrayToSend); | |
$headers = array(); |
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
{ | |
"extends": "airbnb", | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"node": true, | |
"mocha": true | |
}, | |
"rules": { | |
// Disable for __DEV__, __SERVER__ usage. |