Skip to content

Files

Latest commit

01651ff · Jul 26, 2018

History

History
This branch is 65 commits behind MineiToshio/CursosPlatzi:master.

Curso de JavaScript Full Stack con Sails.js

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 26, 2018

Curso de JavaScript Full Stack con Sails.js

Tabla de Contenido

Las tecnologías de Sails

Configuración de VS Code

Archivo de configuración:

{
  "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
  "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/.DS_Store": true,
    "node_modules": true,
    "**/.tmp": true,
    "package-lock.json": true
  },
  "editor.formatOnPaste": true,
  "window.zoomLevel": 0,
  "files.associations": {
    ".eslintrc": "jsonc"
  }
}

keybindings.json (Tuerca -> Keyboard Shortcuts -> keybindings.json)

[
  {
    "key": "ctrl+v",
    "command": "pasteAndIndent.action",
    "when": "editorTextFocus && !editorReadonly"
  },
  { 
    "key": "ctrl+shift+v",               
    "command": "editor.action.clipboardPasteAction",
    "when": "editorTextFocus && !editorReadonly" 
  },
  {
    "key": "ctrl+v",
    "command": "-editor.action.clipboardPasteAction",
    "when": "editorTextFocus && !editorReadonly"
  }
]

Extensiones:

  • EJS Language Support añade soporte para archivos .ejs
  • Less IntelliSense soporte para archivos .less
  • ESLint revisa errores

Además se debe de instalar ESLint globalmente

npm install eslint -g

Instalar Sails

npm install sails -g

Crear una aplicación con Sails

sails new [app]

Se van a mostrar 2 opciones:

  1. Web App para un proyecto con auth, login y password recovery
  2. Empty una app en Sails sin configuración.

sails lift para levantar el servidor y correr la aplicación.

Arquitectura Backend

Comandos

  • sails new [app] crea una app en sails
  • sails lift levanta el servidor

Enlaces de Interés