# santosh.nodejspractice

> Setup and practice Node js coding

Latest version **1.0.4** (published 2020-03-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install santosh.nodejspractice
pnpm add santosh.nodejspractice
yarn add santosh.nodejspractice
bun add santosh.nodejspractice
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2020-03-21 |
| First published | 2020-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Santosh Marigowda |
| Maintainers | santosharakere |

## Links

- npm: https://www.npmjs.com/package/santosh.nodejspractice
- Repository: https://github.com/smarigowda/nodejs_practice
- Homepage: https://github.com/smarigowda/nodejs_practice#readme
- Issues: https://github.com/smarigowda/nodejs_practice/issues
- npm.io page: https://npm.io/package/santosh.nodejspractice

## Recent versions

- 1.0.4 (latest) — 2020-03-21
- 1.0.3 — 2020-03-21
- 1.0.2 — 2020-03-21
- 1.0.1 — 2020-03-21
- 1.0.0 — 2020-03-21

## README

# Purpose:

Setup and practice Node js coding

## Reference:

https://www.robinwieruch.de/minimal-node-js-babel-setup

https://babeljs.io/docs/en/next/babel-cli

## Initialize using yarn
```
yarn init
```

## Install Packages and Setup babel:

Install babel core and preset.

```
npm install @babel/core @babel/node --save-dev
npm install @babel/preset-env --save-dev
```

`babel-node` is a CLI that works exactly the same as the Node.js CLI, with the added benefit of compiling with Babel presets and plugins before running it.

---

Enable the preset by creating a `.babelrc` file:

```
{
  "presets": ["@babel/preset-env"]
}
```

Install `nodemon`, a tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected.

```
npm install --save-dev nodemon
```

## Install babel cli

```
npm install --save-dev @babel/cli
```

## Setup npm registry

```
npm config set registry https://registry.npmjs.com/
```

## Create .npmrc file

```
//.npmrc
// Create auth token by logging into npm and replace AUTH-TOKEN with it.
registry=https://registry.npmjs.com/AUTH-TOKEN/santosharakere/
```
## Login to npm
```
npm login
```
## Publish package
```
npm publish
```
## Use the published package in a new npm package.

## Install babel package for Class support. And enable Class Properties.
```
npm install --save-dev @babel/plugin-proposal-class-properties
```

---
_Source: https://npm.io/package/santosh.nodejspractice · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
