Giter VIP home page Giter VIP logo

nodekb's Introduction

Article Knowledgebase Application

This is a knowledgebase app used in the "Node.js & Express From Scratch" Youtube series.

Technologies

  • Node.js
  • Express
  • Express Messages, Session, Connect Flash & Validation
  • MongoDB & Mongoose
  • Pug Templating
  • Passport.js Authentication
  • BCrypt Hashing

Version

2.0.0

Usage

Installation

Install the dependencies

$ npm install

Run app

$ npm start

nodekb's People

Contributors

bradtraversy avatar dependabot[bot] avatar dominikwron avatar zubair-saif avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodekb's Issues

Articles for users only

Hi everything works fine, but is it possible to limit articles to specific users only... Example user1 registers and adds article, user2 registers also but he can delete user1 article... can this be limited, for example user1 has access to own articles only..

Mongoose error "throw new MongooseError('The `uri` parameter to `openUri()` must be a ' +" on running npm start

I forked the main branch; ran the first command npm install and it installed the necessary modules;

when I ran the next command npm start this is the error log I received in the terminal; I visited StackOverflow looking for answers to no avail.

Server started on port 3000...
D:\Github Repos\Demosignin\node_modules\mongoose\lib\connection.js:680
    throw new MongooseError('The `uri` parameter to `openUri()` must be a ' +
          ^

MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.
    at Connection.openUri (D:\Github Repos\Demosignin\node_modules\mongoose\lib\connection.js:680:11)
    at D:\Github Repos\Demosignin\node_modules\mongoose\lib\index.js:345:10
    at D:\Github Repos\Demosignin\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:5
/modules/cjs/loader:1174:10)
    at Module.load (node:internal/modules/cjs/loader:998:32)
    at Module._load (node:internal/modules/cjs/loader:839:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47

StackOverflow question visited is here

This brought me back to square one.
I need help to solve this error log. @bradtraversy @zubair-saif @DominikWronski

Cannot GET article using findByID

As you click on Article one it doesn't open the article and it's because it's not finding the article by ID, could you please how to fix it?

Duplicate Username

There would be a problem that multiple users share the same username, but we're able to login with the one who first registered. Is there any ways to prevent it happen like what we did to validate those required inputs to be not empty?

Cannot read property '_id' of null

Getting the following error after changing the 'edit_article.pug' file:

Cannot read property '_id' of null

My code is:

extends layout

block content
h1 #{title}
form(method='POST', action='/articles/edit/'+article._id)
#form-group
label Title:
input.form-control(name='title', type='text', value=article.title)
#form-group
label Author:
input.form-control(name='author', type='text', value=article.author)
#form-group
label Body:
textarea.form-control(name='body') article.body
input.btn.btn-primary(type='submit',value='Submit')

"TypeError: Cannot read property '_id' of undefined"

.
.
.
 let article = new Article();
    article.title = req.body.title;
    article.author = req.user._id;
    article.body = req.body.body;
.
.
.

Here in router.post('/add',....

I get the error of "TypeError: Cannot read property '_id' of undefined".

But I can correctly login with user.

How to solve this?

Image load

Hi, Brad! Thanks for much, the best video tutorial. Your videos me helps on dissertation!!!
Please, You can make a lesson, on how to upload a picture and display it on a browser? ๐Ÿ™Œ๐Ÿป๐Ÿ‘๐Ÿป๏ปฟ

express-validator Module Error

When i tried to include the Express validator middleware, nodemon gives me an error which says 'expressValidator is not a function"

Database Error, breaks the script and the server

Hello,
my english is not that good, use Translate ;)
I came to you via Youtube and now here to my problem.
Edit Article => input Author = UserID from MongoDB
Change "input Author" and call Artilel, breaks the script and the server :(
How can you catch that ???

LG
Volker

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.