Skip to content

Instantly share code, notes, and snippets.

// TODO: make `pages` optional and measure the div when unspecified, this will
// allow more normal document flow and make it easier to do both mobile and
// desktop.
import {
createContext,
useCallback,
useContext,
useEffect,
useMemo,
useRef,
@johnsonthedev
johnsonthedev / route.tsx
Created December 17, 2023 05:49 — forked from AmitMirgal/route.tsx
google places and geocoding
import { Loader } from "@googlemaps/js-api-loader";
export default function Example() {
const loader = new Loader({
apiKey: "<google-API-key>",
version: "weekly",
libraries: ["places", "geocoding"],
});
useEffect(() => {

Authentication with an Express API and Postgres

Setting Up

Let's make sure our Express app has the required base modules:

# within root of API
npm install --save express pg knex bcrypt
npm install --save-dev nodemon