class: center middle
<style> .remark-code { white-space: pre-wrap; } </style>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following are common command-line commands for using Angular. Assumes you have node.js already installed, which is a prerequisite. | |
npm i npm # Update to the latest version of node package manager (npm). May be necessary to have latest version so in order to d/l some packages. | |
# npm is basically a super popular software registry that has hundreds of thousands of packages you can install via npm commands. Angular and ReactJS rely on it to install their modules. | |
npm install -g @angular/cli # use to install the angular Command-Line Interface (CLI). Any commands that start with "ng" are using the CLI. | |
ng new my-app # Create a new app called "my-app". Creating a new app takes me ~10+ mins on my laptop b/c it generates ~300MB of files, so feel free to grab a cup of coffee in the meantime. | |
cd my-app # Go to the new app’s directory to serve it | |
ng serve --open # Command to serve the app locally at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This method uses the modern systemd way to run a Java JAR (i.e. a Spring Boot app) as a daemon as opposed to using the older method of using init.d (SystemV). Using the "&" symbol to run the process in the background isn't sufficient b/c the process will be shut down when the terminal closes (or when you exit your SSH session if remoting in to the machine). Using the "nohup" command is another option, but that is like the "poor man's way" of running a service: doesn't restart on machine reboot; program ignores interrupts, quit signals, and hangups. For more info see: https://stackoverflow.com/questions/958249/whats-the-difference-between-nohup-and-a-daemon . | |
Anyways, to create a Linux daemon the systemd way: | |
Create a service file in /etc/systemd/system. Let's call it javaservice.service. Let the contents be: | |
[Unit] | |
Description=My Java Service | |
[Service] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": "eslint:recommended", | |
"rules": { | |
"dot-notation": 1, | |
"valid-typeof": 2 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
// printWidth: 80, // 80 | |
// tabWidth: 2, // 2 | |
// useTabs: false, // false | |
// semi: true, // true | |
singleQuote: true, // false | |
trailingComma: 'es5', // none | es5 | all | |
// bracketSpacing: true // true | |
// jsxBracketSameLine: false // false | |
// arrowParens: avoid // avoid | always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": ["fullstack"], | |
"parser": "babel-eslint", | |
"rules": { | |
"semi": [1, "always"], | |
"linebreak-style": "off", | |
"quotes": "off", | |
"semi": "off" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.renderIndentGuides": true, | |
"editor.renderWhitespace": "boundary", | |
"editor.renderControlCharacters": false, | |
"editor.rulers": [80, 100], | |
"editor.tabSize": 2, | |
"editor.trimAutoWhitespace": false, | |
"editor.wordWrap": "on", | |
"files.trimTrailingWhitespace": true, | |
"files.insertFinalNewline": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"explorer.confirmDelete": false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 2 | |
indent_style = space | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 2 | |
indent_style = space | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
OlderNewer