Skip to content

Instantly share code, notes, and snippets.

//Check this link for more info
//https://spectrum.chat/apollo/apollo-server/using-express-alongside-apollo-server~0da4a3f3-e441-46b8-987e-de3374fb3e66
const { ApolloServer, gql } = require('apollo-server-express');
import Express from 'express';
const app = new Express();
@Salamit
Salamit / countries.json
Last active March 31, 2022 04:51
Countries.json
//sourced and altered: https://stackblitz.com/edit/react-contry-select
//Compatible with Vulcan.js smartforms
export const countries = [
{
value: 'Afghanistan',
label: 'Afghanistan'
},
{
value: 'Albania',
label: 'Albania'
import '../modules/index.js';
import { Meteor } from 'meteor/meteor';
const {google} = require('googleapis');
const fs = require('fs');
Meteor.startup( function (){
Meteor.methods({
//credits: https://morioh.com/p/1313d7785668/node-js-using-google-sheets-api-with-oauth-2
//credits: http://www.gethugames.in/2012/04/authentication-and-authorization-for-google-apis-in-javascript-popup-window-tutorial.html
@Salamit
Salamit / GoogleApiAuth.jsx
Last active May 14, 2019 11:23
Authenticate your React, Meteor, Vulcanjs App using OAuth2 for Google Spreadsheets (May 2019)
import React, { useState, useEffect, PropTypes, Component, useContext } from 'react';
import { registerComponent, Components } from 'meteor/vulcan:core';
import { withRouter } from 'react-router';
import AppContext from '../common/AppContext';
//credits: http://www.gethugames.in/2012/04/authentication-and-authorization-for-google-apis-in-javascript-popup-window-tutorial.html
function popUpAuth(url) {
const win = window.open(url, "Authentication", 'width=500,height=600');
const REDIRECT = "http://localhost:3000";