> For the complete documentation index, see [llms.txt](https://triyono.gitbook.io/node-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://triyono.gitbook.io/node-js/getting-started.md).

# Getting started

untuk start projek nodejs

```bash
npm init --y
```

install nodemon biar auto restart, dan simpan di dev depdency

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

buat file server.js

lalu pada package.json tambahkan pada script

```bash
  "scripts": {
    "start": "nodemon server.js"
  },
  
```

lalu  run

```bash
npm run start
```

tambahan install eslint

```bash
npm install eslint --save-dev
```

lakukan setting

```bash
npx eslint --init
```

* How would you like to use ESLint? -> *To check, find problems, and enforce code style.*
* What type of modules does your project use? -> *CommonJS (require/exports).*
* Which framework did you use? -> *None of these.*&#x20;
* Does your project use TypeScript? -> *N*.
* Where does your code run? -> *Node* (pilih menggunakan spasi).
* How would you like to define a style for your project? -> *Use a popular style guide.*
* Which style guide do you want to follow? -> (**Anda bebas memilih**, sebagai contoh pilih AirBnB).
* What format do you want your config file to be in? -> *JSON*.
* Would you like to …… (seluruh pertanyaan selanjutnya) -> *Y*.

sumber

{% embed url="<https://www.dicoding.com/academies/261/tutorials/14757?from=14752>" %}
