|
|
|
## Setup of the basic application
|
|
|
|
|
|
|
|
To setup the root application we use Next.js.
|
|
|
|
At first we have to install Node.js (version 10.13 or later). After that we use the console and direct to a new folder for our project (we could also open the folder in VSCode and use the terminal) and run the command:
|
|
|
|
```js
|
|
|
|
npx create-next-app@latest nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/master/basics/learn-starter"
|
|
|
|
```
|
|
|
|
Now an example app from Next.js is being created in this directory:
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
To run the application we have to change into the directory called **nextjs-blog**:
|
|
|
|
```sh
|
|
|
|
cd nextjs-blog
|
|
|
|
```
|
|
|
|
|
|
|
|
Then we run the command:
|
|
|
|
```js
|
|
|
|
npm run dev
|
|
|
|
```
|
|
|
|
which starts the Next.js app`s development server on port 3000.<br>
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
To check if the app is working properly we can just open http://localhost:3000 from our browser, wich should look like this:
|
|
|
|
 |
|
|
|
\ No newline at end of file |