Skip to content

Instantly share code, notes, and snippets.

@lmas3009
Created January 29, 2021 15:23
Show Gist options
  • Save lmas3009/13323d47ef97d295630afd703c95be3b to your computer and use it in GitHub Desktop.
Save lmas3009/13323d47ef97d295630afd703c95be3b to your computer and use it in GitHub Desktop.
Rest API using MEN (MongoDB,ExpressJs and NodeJs)
import mongoose from "mongoose"
const CarsSchema = mongoose.Schema({
Name: String,
Model: String,
Price: String,
meta: {
Fuel_Type: String,
Mileage: String,
Seating_Capacity: Number
},
})
export default mongoose.model("Cars",CarsSchema)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment