Giter Site home page Giter Site logo

server about adobot-io HOT 20 CLOSED

adonespitogo avatar adonespitogo commented on July 17, 2024
server

from adobot-io.

Comments (20)

knkrth avatar knkrth commented on July 17, 2024

How to change ./config/config.json setting for development on localhost?

from adobot-io.

adonespitogo avatar adonespitogo commented on July 17, 2024
"development": {

    "username": "root",

    "password": null,

    "database": "adobot",

    "host": "127.0.0.1",

    "dialect": "mysql",

    "admin" : {

      "username": "admin",

      "password": "admin"

    }

  }

This is a configuration for database. The admin section refers to admin panel login credentials.

from adobot-io.

knkrth avatar knkrth commented on July 17, 2024

Thanks.

from adobot-io.

adonespitogo avatar adonespitogo commented on July 17, 2024

After setting up the database, run ./node_modules/.bin/sequelize db:migrate to create the db tables

from adobot-io.

knkrth avatar knkrth commented on July 17, 2024

Ok.

from adobot-io.

knkrth avatar knkrth commented on July 17, 2024

I got this error on npm install

`Sequelize [Node: 8.9.3, CLI: 2.7.0, ORM: 3.30.4]

Loaded configuration file "config/config.json".
Using environment "development".
/home/ubuntu/adobot/node_modules/mysql/lib/protocol/Parser.js:80
    throw err; // Rethrow non-MySQL errors
    ^

TypeError: "value" argument must not be a number
at Function.Buffer.from (buffer.js:186:11)
at Object.Auth.token (/home/ubuntu/adobot/node_modules/mysql/lib/protocol/Auth.js:29:29)
at Handshake._sendCredentials 
(/home/ubuntu/adobot/node_modules/mysql/lib/protocol/sequences/Handshake.js:78:14)
at Handshake.HandshakeInitializationPacket 
(/home/ubuntu/adobot/node_modules/mysql/lib/protocol/sequences/Handshake.js:60:10)
at Protocol._parsePacket 
(/home/ubuntu/adobot/node_modules/mysql/lib/protocol/Protocol.js:280:23)
at Parser.write (/home/ubuntu/adobot/node_modules/mysql/lib/protocol/Parser.js:76:12)
at Protocol.write (/home/ubuntu/adobot/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket.<anonymous> (/home/ubuntu/adobot/node_modules/mysql/lib/Connection.js:103:28)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:594:20)`

from adobot-io.

adonespitogo avatar adonespitogo commented on July 17, 2024

Can you show your config.json file?

from adobot-io.

knkrth avatar knkrth commented on July 17, 2024

My bad. I changed the mysql password from a number to a string now I got new error

Sequelize [Node: 8.9.3, CLI: 2.7.0, ORM: 3.30.4] reading "config/config.json". Error: SyntaxError: /home/ubuntu/adobot/config/config.json: Unexpected token r in JSON at position 144

from adobot-io.

adonespitogo avatar adonespitogo commented on July 17, 2024

Systax error. Make sure your config.json is a valid json file.

from adobot-io.

adonespitogo avatar adonespitogo commented on July 17, 2024

You're probably missing a comma between fields:

{
"field": "value",
}

from adobot-io.

knkrth avatar knkrth commented on July 17, 2024

This my config.json file

  "defaults": {
    "charset": "utf8mb4",
    "collate": "utf8mb4_unicode_ci"
  },
  "development": {
    "username": "root",
    "password": root,
    "database": "adobot",
    "host": "127.0.0.1",
    "dialect": "mysql",
    "admin" : {
      "username": "admin",
      "password": "admin"
    }
  }

from adobot-io.

adonespitogo avatar adonespitogo commented on July 17, 2024

The password field root - put it inside quotes so it looks like "password" : "root".

from adobot-io.

knkrth avatar knkrth commented on July 17, 2024

On MYSQL "password" : password goes without quotes & there is no line 144 on config.json

from adobot-io.

adonespitogo avatar adonespitogo commented on July 17, 2024

Replace the whole content of your config.json file with the following. That will fix it

{
  "defaults": {
    "charset": "utf8mb4",
    "collate": "utf8mb4_unicode_ci"
  },
  "development": {
    "username": "root",
    "password": "root",
    "database": "adobot",
    "host": "127.0.0.1",
    "dialect": "mysql",
    "admin" : {
      "username": "admin",
      "password": "admin"
    }
  },
  "production": {
    "use_env_variable": "DATABASE_URL",
    "pool": {
      "max": 5,
      "min": 1,
      "idle": 10000,
      "maxIdleTime": 120000
    },
    "admin": {
      "username": {
        "use_env_variable": "ADMIN_USERNAME"
      } ,
      "password": {
        "use_env_variable": "ADMIN_PASSWORD"
      }
    }
  }
}

from adobot-io.

knkrth avatar knkrth commented on July 17, 2024

Everything Works perfect now. Thank you.

from adobot-io.

knkrth avatar knkrth commented on July 17, 2024

Is there any plan on adding File Manager, Camera, Mic On it?

from adobot-io.

adonespitogo avatar adonespitogo commented on July 17, 2024

I'm no longer using this spyware now, so I'm not adding any features. But I'm willing to assist anyone willing to add more feature to the app.

from adobot-io.

knkrth avatar knkrth commented on July 17, 2024

Ok. I'm closing this issue as its been resolved.

from adobot-io.

lordcharlx avatar lordcharlx commented on July 17, 2024

@knkrth please can you share or show how you add the above I mean mic,file manager and camera thanks in advance

from adobot-io.

knkrth avatar knkrth commented on July 17, 2024

@lordcharlx I did not add any new features

from adobot-io.

Related Issues (20)

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.