Giter Club home page Giter Club logo

litefarm-minimal's People

Contributors

kikemarquez8 avatar orangelmarquez avatar

Watchers

 avatar  avatar  avatar  avatar

litefarm-minimal's Issues

Trouble logging in as user

Hi,
I'm trying to run the app and so far I have set up the front and back end.

Initially I had a problem getting the back end running due to this error

> node index.js

/Users/craigyu/Documents/Work/UBC Work Doc/interview/litefarm-test/litefarm_back/models/validators.js:19
    _validations = [];
                 ^

SyntaxError: Unexpected token =
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)

So i did the following edits and it worked:
screenshot

Signing up was fine but when I tried to log in the server crashed with the error:

> node index.js

Listening in port 3000
crypto.js:117
  this._handle.init(hmac, toBuf(key));
               ^

TypeError: Key must be a buffer
    at new Hmac (crypto.js:117:16)
    at Object.createHmac (crypto.js:643:10)
    at hashHeaderAndPayload (/Users/craigyu/Documents/Work/UBC Work Doc/interview/litefarm-test/litefarm_back/config/jwt.js:77:25)
    at sign (/Users/craigyu/Documents/Work/UBC Work Doc/interview/litefarm-test/litefarm_back/config/jwt.js:13:35)
    at PBKDF2.crypto.pbkdf2 [as ondone] (/Users/craigyu/Documents/Work/UBC Work Doc/interview/litefarm-test/litefarm_back/models/farmer.js:41:25)

Do you know what i should do to fix this? Thanks

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.