Giter Site home page Giter Site logo

next-mongo's Introduction

The new Next.js (13) MongoDB example is integrated with Typescript. Unfortunately for me, I am not as familiar with the language yet. This repository was created for those using the standard Next.js framework with only JavaScript-related files.

This is based off of the tutorial by Hamed Bahram.

Things to note

  • This application using the vanilla MongoDB library. No Mongoose features and the like.
  • This uses the sample data provided by MongoDB. Specifically, this is using the sample_mflix database with all of its collections.

How to install locally

  1. Git clone the repo
  2. Go to local repo directory
  3. Run the command npm init to install all the necessary packages and libraries
  4. Create your own .env.local file in the outermost layer of the folder directory (./next-mongo)
  5. In the newly-created .env.local file, make sure you have these environments:
MONGODB_URI="<db_uri_string>"
NODE_ENV="DEV"
  1. Run npm run dev, which is the designated run script in a developer environment
  2. Test

How to deploy (using Vercel)

  1. Link the repo to the Vercel app
  2. Create environmental variables, MONGODB_URI and NODE_ENV
  3. Enter their string values respectively (NODE_ENV is expected to have the value PROD)
  4. Deploy the application

Where to get MONDODB_URI and MONGODB_DB?

[To be written]

next-mongo's People

Contributors

enricosebastian avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.