Start installation

Create a project directory and enter

$ mkdir my-nodestack-app
$ cd my-nodestack-app 


Next, start creating the project and installing the necessary packages. If prompted, just press Enter

$ npm create nodestack
$ npm i


Now that you have completed the installation, you should see the following directory structure

my-nodestack-app
├── src
│   ├── pages
│   │   └── index.js
│   │   └── style.scss
├── ndsk.config.js
└── package.json


Open the package.json file, you can see the following content in the script

{
    "scripts": {
        "dev": "ndsk",
        "build": "ndsk build",
        "start": "ndsk start"
    }
}


These scripts correspond to different stages of the program:

  • dev: Run npm run dev to start nodestack in development mode
  • build: Run npm run build to start building the project
  • start: Run npm run start to run the built project in production environment


Now enter the following code in the terminal to start our first project

$ npm run dev


You can see the following log output

> My App@1.0.0 dev
> ndsk

> Startup time:450ms Ready on http://127.0.0.1:3000


Enter http://127.0.0.1:3000 in your browser to start accessing your project

Next

Route