GithubHelp home page GithubHelp logo

nicholas-sliter / mimdb Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 87.14 MB

Class project for CS312 Software Development at Middlebury College, Fall 2021. Authors: Nicholas Sliter, Wayne Wang, Jiaqi Li, Katie Kosior, Nick McKalip, and Rebecca Hochman-Fisher.

Home Page: https://mimdb.herokuapp.com/

Shell 0.03% JavaScript 83.58% SCSS 14.31% CSS 2.08%

mimdb's Introduction

Build Status alt text

Heroku link

Visit the deployed application on heroku at https://mimdb.herokuapp.com/

This is the starter template for CS312 projects based on Next.js](https://nextjs.org/). You should replace this portion with a description of your project.

The project was bootstrapped with create-next-app, and includes a number of additional libraries, including the Rest Testing Library, Jest, and ESLint, among others. It also includes the basic configuration for using Travis CI.

To ensure consistent style, this template is also set up with Prettier, with the configuration to automatically reformat code during a commit. That is whenever you commit your code, Prettier will automatically reformat your code during the commit process (as a "hook"). The hook is specified in the package.json file.

Note: I've provided the processes for interacting with this project if you have a local installation. Running on Replit simplifies many of these steps (but not all of them, so please do read through).

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

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

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

Testing

To run tests, just run the test script:

npm test

You can also run the tests in "watch" mode where it will re-run the tests as you save your work:

npm test -- --watch

You can also run jest selectively on a single file using npx:

npx jest path/to/file

Linting

The repository is set up to run eslint with our custom rule set we have used for the last assignments.

npm run lint

Continuous Integration

The skeleton is setup for CI with Travis-CI.

Deploying to Heroku

Your application can be deployed to Heroku using the approach demonstrated in this repository.

Assuming that you have a Heroku account, have installed the Heroku command line tools and committed any changes to the application, to deploy to Heroku:

  1. Log in to Heroku
heroku login
  1. Create the Heroku app, e.g., to create a project called project-name:

    heroku create project-name
    
  2. Push to Heroku

    git push heroku main
    
  3. Open your newly deployed application

heroku open

Depending on how you implement your server, you will likely need create "add-ons" for your database, etc. and migrate then seed your database before you deploy.

Heroku with RDBMS

Heroku provides a free add-on with the PostgreSQL database. Provision the add-on with the following command. The provisioning will define process.env.DATABASE_URL in the Heroku environment (which can be used by your database interface, e.g. by Knex in its configuration file).

heroku addons:create heroku-postgresql:hobby-dev

Once you have deployed your application (and provisioned the database) migrate and seed the database on Heroku with the following commands. heroku run executes the specified command in the context of your application on the Heroku servers.

heroku run 'npx knex migrate:latest'
heroku run 'npx knex seed:run'

You can test your backend without pushing to Heroku. The database Heroku created for you is accessible from anywhere. Use heroku config to obtain the DATABASE_URL variable. Define that variable locally with ?ssl=true appended, e.g.

export DATABASE_URL="postgres://...?ssl=true"

You can also directly access your PostgreSQL database. Download and install one of the many PostgreSQL clients and use the DATABASE_URL from Heroku for the connection information.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

mimdb's People

Contributors

christopherpandrews avatar github-classroom[bot] avatar jiaqi-beep avatar kkosior1120 avatar nicholas-sliter avatar nickmckalip avatar rebeccahochman-fisher avatar waynew99 avatar xanshea avatar

Stargazers

 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.