Skip to content

raymondtju/nextjs-mongoose

Repository files navigation

Next.JS + Mongoose

Starter Pack Next.JS + Mongoose

Raymond Tju Twitter follower count

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying src/pages/index.tsx. The page auto-updates as you edit the file.

Configuring of Mongo Model can be done at ./lib/model/test.model.ts

API routes can be accessed on http://localhost:3000/api/test/create. This endpoint can be edited in src/pages/api/test/create.ts .

How to connect to MongoAtlas Database

Connect to your MongoAtlas Database by creating .env.local and create var name MONGODB_URI = ...

Cloud Database

ODM

  • Mongoose – Elegant mongodb object data modeling for node.js

Frameworks

  • Next.js – React framework for building performant apps with the best developer experience

Code Quality

  • TypeScript – Static type checker for end-to-end typesafety
  • ESLint – Pluggable linter for Next.js and TypeScript