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
sa@mbp: /tmp mkdir akita-react; cd akita-react; npm init -y | |
Wrote to /private/tmp/akita-react/package.json: | |
{ | |
"name": "akita-react", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" |
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 babel from 'rollup-plugin-babel'; | |
import commonjs from 'rollup-plugin-commonjs'; | |
import config from 'sapper/config/rollup.js'; | |
import getPreprocessor from 'svelte-preprocess' | |
import path from 'path' | |
import pkg from './package.json'; | |
import postcss from 'rollup-plugin-postcss' | |
import replace from 'rollup-plugin-replace'; | |
import resolve from 'rollup-plugin-node-resolve'; | |
import svelte from 'rollup-plugin-svelte'; |
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
// @ts-nocheck TODO: remove at some point | |
//import config from './config'; | |
import express from 'express'; | |
import sirv from 'sirv'; | |
import session from 'express-session'; | |
import bodyParser from 'body-parser'; | |
import * as sapper from '@sapper/server'; | |
import './css/index.css' |
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 dev = process.env.NODE_ENV === 'development'; | |
const base = dev ? 'http://localhost:3000' : 'likesports-v2.web.app'; | |
function send({ method, path, data, token }) { | |
const fetch = process.browser ? window.fetch : require('node-fetch').default; | |
const opts = { method, headers: {} }; | |
if (data) { |
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
res) => res.send('hello from the SSR function')); |
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 * as functions from 'firebase-functions'; | |
//const express = require('express'); | |
// Start writing Firebase Functions | |
// https://firebase.google.com/docs/functions/typescript | |
// We have to import the built version of the server middleware. | |
const { server } = require('../__sapper__/build/server/server'); | |
exports.ssr = functions | |
.region('us-central1') |
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
// @ts-nocheck TODO: remove at some point | |
// TODO: what todo with those two imports? needed? if so why and how? | |
//import config from './config'; | |
//import './css/index.css'; | |
import sirv from 'sirv'; | |
import polka from 'polka'; | |
import compression from 'compression'; | |
import * as sapper from '@sapper/server'; |
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
// @ts-nocheck TODO: remove at some point | |
// TODO: what todo with those two imports? needed? if so why and how? | |
//import config from './config'; | |
//import './css/index.css'; | |
import sirv from 'sirv'; | |
import polka from 'polka'; | |
import compression from 'compression'; | |
import * as sapper from '@sapper/server'; |
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
// @ts-nocheck TODO: remove at some point | |
// TODO: what todo with those two imports? needed? if so why and how? | |
//import config from './config'; | |
//import './css/index.css'; | |
import sirv from 'sirv'; | |
import polka from 'polka'; | |
import compression from 'compression'; | |
import * as sapper from '@sapper/server'; |
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
{ | |
"name": "functions", | |
"scripts": { | |
"build": "tsc", | |
"deploy": "firebase deploy --only functions", | |
"logs": "firebase functions:log", | |
"serve": "npm run build && firebase serve --only functions", | |
"shell": "npm run build && firebase functions:shell", | |
"start": "npm run shell" | |
}, |
OlderNewer