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 '../styles/globals.scss' | |
import type { AppProps } from 'next/app' | |
import type { ReactElement, ReactNode } from 'react' | |
import type { NextPage } from 'next' | |
type Page<P = {}> = NextPage<P> & { | |
getLayout?: (page: ReactNode) => ReactNode; | |
}; | |
type Props = AppProps & { |
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 { | |
MongoClient | |
} = require("mongodb"); | |
const uri = | |
`mongodb://${encodeURIComponent(process.env.MONGO_USER)}:${encodeURIComponent(process.env.MONGO_PASSWORD)}@${process.env.MONGO_HOST}?retryWrites=true&writeConcern=majority`; | |
const client = new MongoClient(uri, { | |
useNewUrlParser: true, | |
useUnifiedTopology: true, |
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
zip_file_location = './zipFileName.zip' | |
zip = zipfile.ZipFile(zip_file_location,'w') | |
file_location_one = f'{fileNameOne}.json' | |
with open(file_location_one, 'w') as file: | |
json.dump(elementsOne, file, default=str) | |
zip.write(file_location_one) |