Giter Club home page Giter Club logo

serverlinkr's Introduction

Hi ๐Ÿ‘‹, I'm Colby Whitlock

As an aspiring developer, I am constantly embracing a learning mindset, eager to expand my skills and knowledge, driven by my passion for coding and determined to make a successful transition into a fulfilling career in development.

Connect with me:

colbywhitlock

Languages and Tools:

aws docker express firebase git javascript linux mongodb mysql nodejs react sass

serverlinkr's People

Contributors

deepsource-io[bot] avatar whitlocktech avatar

Stargazers

 avatar

Watchers

 avatar

serverlinkr's Issues

Fix links functions

Fix the Links functions in react

  • updateLinks
  • deleteLinks
  • add user routes and protection.

Both will Go under the editLinks component.
On the backend Add a users auth route.

  • then add route protection to the edit add and delete routes

(JS-0111) Unnecessary `return await` function found

Description

Returning an awaited value (like with return await f()) has two problems: - It queues an extra microtask, blocking the callstack until return is executed.

Occurrences

const linksDatabase = require('./links.mongo')

async function getAllLinks() {
  return await linksDatabase
    .find({})
    .sort({ _id: 1 })
    .catch((error) => {
      console.error(error)
      return []
    })
}

async function saveLink(link) {
}

async function getLinkById(id) {
  return await linksDatabase.findOne({
    _id: id,
  })
}
async function getLinksByKeyword(keyword) {
  return await linksDatabase.find({
  })
}
async function getLinksByKeyword(keyword) {
  return await linksDatabase.find({
    keywords: keyword,
  })
}

module.exports = {

Server crashing

On some routes if we get an error It is causing the server to crash

Will update when i look at the issue some more
it is under the /api/v1/links not sure which one

(JS-0116) `async function` should have `await` expression

Description

A function that does not contain any await expressions should not be async (except for some edge cases in TypeScript which are discussed below). Asynchronous functions in JavaScript behave differently than other functions in two important ways:

Occurrences

const server = http.createServer(app)

async function startServer() {
  server.listen(PORT, () => {
    mongoConnect()
    console.log(`Server is running on port ${PORT}`)
  })
}

startServer()
  console.error('Mongoose Connection Error', err)
})

async function mongoConnect() {
  mongoose.connect(MONGO_URL)
}

async function mongoDisconnect() { 
  await mongoose.disconnect()

Login api returning 400 bad request

Describe the bug
When testing the api in postman it is returning 400 bad request

To Reproduce
use a post request to {host]/api/v1/auth/login

Expected behavior
exprected a 200 ok return

I think it might be something in the passport config but im not sure.

This is working in the branch userSystem

(JS-D1001) Documentation comments not found for functions and classes

Description

It is recommended to have documentation comments above, or right inside a function/class declaration. This helps developers, users and even the author understand the purpose of a code snippet or API function in the future. NOTE: If you want to stop this issue from getting raised on certain constructs (arrow โ€ฆ

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.