Задать вопрос
Ответы пользователя по тегу Node.js
  • Как собрать и задеплоить проект на NodeJS ES6 в dokkur?

    chuikoffru
    @chuikoffru Автор вопроса
    Full Stack JS Developer
    Все оказалось проще чем я думал.

    "scripts": {
        "dev": "nodemon --exec babel-node -- src/index.js",
        "start": "node dist",
        "build" : "babel src -d dist --presets=env"
      },


    Хотя конечно вопросы еще остались некоторые. А именно выкладка результата на dokkur.com.

    konstantin$ git push dokkur master
    Counting objects: 101, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (93/93), done.
    Writing objects: 100% (101/101), 17.94 KiB | 0 bytes/s, done.
    Total 101 (delta 45), reused 0 (delta 0)
    -----> Cleaning up...
    -----> Building jwbot from herokuish...
    -----> Adding BUILD_ENV to build environment...
    -----> Fetching custom buildpack
    -----> Node.js app detected
           
    -----> Creating runtime environment
           
           NPM_CONFIG_LOGLEVEL=error
           NPM_CONFIG_PRODUCTION=true
           NODE_ENV=production
           NODE_MODULES_CACHE=true
           
    -----> Installing binaries
           engines.node (package.json):  7.7.2
           engines.npm (package.json):   4.1.2
           
           Downloading and installing node 7.7.2...
           npm 4.1.2 already installed with node
           
    -----> Restoring cache
           Loading 2 from cacheDirectories (default):
           - node_modules
           - bower_components (not cached - skipping)
           
    -----> Building dependencies
           Installing node modules (package.json)
           
    -----> Caching build
           Clearing previous node cache
           Saving 2 cacheDirectories (default):
           - node_modules
           - bower_components (nothing to cache)
           
    -----> Build succeeded!
           +-- cheerio@0.22.0
           +-- request@2.81.0
           `-- telebot@1.0.7
           
           addons: []
           default_process_types:
           web: npm start
    -----> Discovering process types
           Procfile declares types -> web
    -----> Releasing jwbot (dokku/jwbot:latest)...
    -----> Deploying jwbot (dokku/jwbot:latest)...
    -----> Attempting to run scripts.dokku.predeploy from app.json (if defined)
    -----> App Procfile file found (/home/dokku/jwbot/DOKKU_PROCFILE)
    -----> DOKKU_SCALE file found (/home/dokku/jwbot/DOKKU_SCALE)
    =====> web=1
    -----> Running pre-flight checks
           For more efficient zero downtime deployments, create a file CHECKS.
           See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
           CHECKS file not found in container: Running simple container check...
    -----> Waiting for 10 seconds ...
    remote: App container failed to start!!
    =====> jwbot web container output:
    =====> end jwbot web container output
    To uvuz25_chuikoff_ru@north-europe-7.dokkur.com:jwbot
     ! [remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to 'uvuz25_chuikoff_ru@north-europe-7.dokkur.com:jwbot'


    Причина реджекта мне не понятна.
    Ответ написан
    Комментировать
  • Как получить email через API ВКонтакте PassportJS?

    chuikoffru
    @chuikoffru Автор вопроса
    Full Stack JS Developer
    Все задача решена!!! Юхухууу!!!

    passport.use('vk', new vk({
        clientID: config.get('auth:vk:app_id'),
        clientSecret: config.get('auth:vk:secret'),
        callbackURL: config.get('app:url') + "/auth/vk/callback",
        apiVersion : "5.32"
    },function (accessToken, refreshToken, params, profile, done) {
        console.log(params);
    }));
    Ответ написан
    Комментировать