Skip to content

elkinuk/VK-bot

Repository files navigation


Elkin
NewsAPI task

VKbot on js. vkAPI was used



God bless to:

  • ES6 - JavaScript has grown a lot in the past few years and lot of new features had been added to JavaScript to make it much more powerful and productive programming language
  • HTML5 - the latest version of Hypertext Markup Language, the code that describes web pages. It's actually three kinds of code: HTML, which provides the structure; Cascading Style Sheets (CSS), which take care of presentation; and JavaScript, which makes things happen.
  • CSS3 - the latest evolution of the Cascading Style Sheets language and aims at extending CSS2.1. It brings a lot of long-awaited novelties, like rounded corners, shadows, gradients, transitions or animations, as well as new layouts like multi-columns, flexible box or grid layouts. Experimental parts are vendor-prefixed and should either be avoided in production environments, or used with extreme caution as both their syntax and semantics can change in the future.
  • Webpack - a static module bundler for modern JavaScript applications. When webpack processes your application, it internally builds a dependency graph which maps every module your project needs and generates one or more bundles.
  • JQuery - is a lightweight, "write less, do more", JavaScript library. The purpose of jQuery is to make it much easier to use JavaScript on your website. jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code.

How to build the magic (macOS)

1. In file vk.js set your token in `parameters.access_token` [How to get the token]

2. Start the DB server

    turn on  XAMPP
    turn on there Apache and MySQL
    $ cd path/to/your/project/folder
    $ node bd_server.js

3. Start the Bot

    $ cd path/to/your/project/folder
    $ webpack
    $ npm start

4. Open localhost:8000

!!! For correct work, setup CORS extension for your browser !!!