Skip to content

Latest commit

 

History

History
 
 

src

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Sample Next.js app with MongoDB

This sample app was generated from the Next.js example using MongoDB. The design is to be used as a walk-through of GitHub features, including Codespaces, Actions and GitHub Advanced Security (GHAS).

Starting the project

The project depends on a MongoDB database. You can install locally or use a cloud based provider of your choosing. To start the project, you need to configure an environment variable to store the connection string for the database, install the NPM packages, and run the server.

  1. Create an environment variable

    # Linux or Mac
    export MONGODB_URI=<connection string>
    # Windows
    set MONGODB_URI=<connection string>
  2. Install the NPM packages and start the server

    npm install
    npm run dev
  3. Enter the following commands to start the dev server

    npm install
    npm run dev

Dog images

You can use the following URLs for the images for pets created in the app: