Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
const AWS = require("aws-sdk"); | |
const { MongoClient } = require("mongodb"); | |
const dotenv = require("dotenv"); | |
dotenv.config(); | |
const s3 = new AWS.S3({ | |
region: "us-west-2", | |
}); |
import * as React from 'react'; | |
import Box from '@mui/material/Box'; | |
import Stepper from '@mui/material/Stepper'; | |
import Step from '@mui/material/Step'; | |
import StepLabel from '@mui/material/StepLabel'; | |
import Button from '@mui/material/Button'; | |
import Typography from '@mui/material/Typography'; | |
import { styled } from '@mui/material/styles'; | |
import StepConnector, { | |
stepConnectorClasses, |
// add custom attribute on the input element or wrapper div data-valid={`${error ? "false" : "true"}} | |
import { useEffect } from 'react'; | |
import { useFormikContext } from 'formik'; | |
const FocusError = () => { | |
const { errors, isSubmitting, isValidating } = useFormikContext(); | |
useEffect(() => { |
var mongoose = require('./index') | |
, TempSchema = new mongoose.Schema({ | |
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']} | |
}); | |
var Temp = mongoose.model('Temp', TempSchema); | |
console.log(Temp.schema.path('salutation').enumValues); | |
var temp = new Temp(); | |
console.log(temp.schema.path('salutation').enumValues); |