GithubHelp home page GithubHelp logo

andrewjbateman / mehn-stack-published Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 924 KB

:clipboard: This app displays publications for multiple authors in Bootstrap cards. It uses the MongoDB, Express, Handlebars & Node.js (MEHN) stack to perform Create, Read, Update and Delete (CRUD) operations.

License: MIT License

JavaScript 56.22% CSS 3.54% Handlebars 40.24%
expressjs mongodb node-js handlebars-template

mehn-stack-published's Introduction

โšก MEHN Stack Published

  • This app displays publications for multiple authors in Bootstrap cards.
  • Uses the MongoDB, Express, Handlebars & Node.js (MEHN) stack to perform Create, Read, Update and Delete (CRUD) operations.
  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

๐Ÿ“„ Table of contents

๐Ÿ“š General info

  • Login authentication using google auth API
  • After authentication dashboard displays list of publications for the person logged in
  • Side menu has navigation to all public publications and a logout link
  • Public publications page displays everyones publications stored in the MongoDB that have 'public' status

๐Ÿ“ท Screenshots

Example screenshot

๐Ÿ“ถ Technologies

๐Ÿ’พ Setup

  • Create a .env file and add MONGO_URI connection string - see .env.example
  • npm run dev to run handlebars client and backend server concurrently. Navigate to http://localhost:3000/ to see frontend (refresh after changes - does not auto-update).

๐Ÿ’ป Code Examples

  • routes/publications.js method to add the new article to the database
// desc    Process the add form
// route   POST /publications
router.post('/', ensureAuth, async (req, res) => {
  try {
    req.body.user = req.user.id;
    await Publication.create(req.body);
    res.redirect('/dashboard');
  } catch (err) {
    console.error(err);
    res.render('error/500');
  }
});

๐Ÿ†’ Features

  • In dev - Front and backends are run with one command

๐Ÿ“‹ Status & To-Do List

  • Status: Mostly working. Refactor - add controllers and add functionality. Change 'read more' footer to floating buttons?
  • To-Do: not seeing css file - fix. Fix CKEDITOR error. replace moment with smaller version. Correct grid of cards to even row height.
  • To-Do: backend code separates Express controller functions from routes
  • To-Do: Updating a note will automatically update the date so it goes to the front of the (date-sorted) notes list

๐Ÿ‘ Inspiration

๐Ÿ“ License

  • This project is licensed under the terms of the MIT license.

โœ‰๏ธ Contact

mehn-stack-published's People

Contributors

andrewjbateman avatar

Watchers

 avatar  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.