View .env
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
NEXT_PUBLIC_USER=hoge | |
NEXT_PUBLIC_PASS=fuga |
View PaginateBox.vue
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
<template> | |
<div class=""> | |
<!-- | |
<h3>PaginateChild</h3> | |
--> | |
<nav class="my-2"> | |
<ul class="pagination"> | |
<li class="page-item"> | |
<a @click="first" class="page-link" href="#">«</a> | |
</li> |
View .dockerignore
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
node_modules | |
npm-debug.log |
View Login.tsx
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 React from 'react'; | |
import { useEffect } from 'react'; | |
import {auth} from '../../firebase'; | |
import { onAuthStateChanged } from "firebase/auth"; | |
//import { getAuth, signInWithRedirect } from "firebase/auth"; | |
import { signInWithRedirect } from "firebase/auth"; | |
import { getRedirectResult, GoogleAuthProvider } from "firebase/auth"; | |
import { signOut } from 'firebase/auth' |
View package.json
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": "react_ts", | |
"version": "0.1.0", | |
"private": true, | |
"dependencies": { | |
"@testing-library/jest-dom": "^5.11.4", | |
"@testing-library/react": "^11.1.0", | |
"@testing-library/user-event": "^12.1.10", | |
"@types/jest": "^26.0.15", | |
"@types/node": "^12.0.0", |
View apiGateway.ts
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 type { APIGatewayProxyEvent, APIGatewayProxyResult, Handler } from "aws-lambda" | |
import type { FromSchema } from "json-schema-to-ts"; | |
type ValidatedAPIGatewayProxyEvent<S> = Omit<APIGatewayProxyEvent, 'body'> & { body: FromSchema<S> } | |
export type ValidatedEventAPIGatewayProxyEvent<S> = Handler<ValidatedAPIGatewayProxyEvent<S>, APIGatewayProxyResult> | |
export const formatJSONResponse = (response: Record<string, unknown>) => { | |
return { | |
statusCode: 200, | |
headers: { |
View graphql.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
const { ApolloServer, gql } = require('apollo-server-lambda'); | |
// typeDefs | |
const typeDefs = gql` | |
type Query { | |
hello: String | |
} | |
`; | |
const resolvers = { |
View app.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
const serverless = require('serverless-http'); | |
const express = require('express'); | |
const indexRouter = require('./routes/index'); | |
const usersRouter = require('./routes/users'); | |
const app = express(); | |
app.use('/', indexRouter); | |
app.use('/users',usersRouter); | |
module.exports = app; |
View LibMongo.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
'use strict'; | |
const MongoClient = require('mongodb').MongoClient; | |
const Config = require('../config.js'); | |
const CFG = Config.getConfig(); | |
//console.log( CFG.MONGODB_URL ); | |
//console.log( CFG.MONGODB_DB_NAME ); | |
const URI = CFG.MONGODB_URL + "?retryWrites=true&w=majority"; | |
const DbName = CFG.MONGODB_DB_NAME; | |
module.exports.getClient = async () => { | |
// console.log("IS_OFFLINE= ", process.env.IS_OFFLINE); |
View app.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
const serverless = require('serverless-http'); | |
const express = require('express'); | |
const indexRouter = require('./routes/index'); | |
const usersRouter = require('./routes/users'); | |
const app = express(); | |
app.use('/', indexRouter); | |
app.use('/users',usersRouter); | |
//module.exports = app; |
NewerOlder