Skip to content
View .eslintrc
env:
node: true
browser: true
# enable ECMAScript features
ecmaFeatures:
arrowFunctions: true
binaryLiterals: true
blockBindings: true
classes: true
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
View 01-simple-server.js
// Далеко не все методы http.Server, описаны в модуле http,
// Это и в других ситуациях бывает: документация в родителях
var http = require('http');
var server = new http.Server();
server.on('request', function(req, res) {
res.end("Hello");
});
View .eslintrc
env:
node: true
browser: true
# enable ECMAScript features
ecmaFeatures:
arrowFunctions: true
binaryLiterals: true
blockBindings: true
classes: true
View user.js
const mongoose = require('mongoose');
const uniqueValidator = require('mongoose-unique-validator');
// uniqueValidator validation is not atomic! unsafe!
const userSchema = new mongoose.Schema({
email: {
type: String,
required: "E-mail пользователя не должен быть пустым.",
validate: [
View gruntfile.js
// ...подключение grunt, плагинов...
grunt.initConfig({
sass: {
dist: {
files: [{
src: 'dev/*.scss',
expand: true,
dest: '.tmp/styles',
ext: '.css'
View gruntfile.js
// ...подключение grunt, плагинов...
grunt.initConfig({
sass: {
dist: {
files: [{
src: 'dev/*.scss',
expand: true,
dest: '.tmp/styles',
ext: '.css'
View gruntfile.js
// ...подключение grunt, плагинов...
grunt.initConfig({
sass: {
dist: {
files: [{
src: 'dev/*.scss',
dest: '.tmp/styles',
expand: true,
ext: '.css'
View gulpfile.js
'use strict';
const isDevelopment = !process.env.NODE_ENV || process.env.NODE_ENV == 'development';
const $c = require('gulp-load-plugins')({
pattern: ['postcss-*', 'css-*', 'css*'],
replaceString: /^postcss-|^css-?/,
lazy: true
});
Something went wrong with that request. Please try again.