Airbnb clone, let’s start by installing Next.js

This post is part of a new series where we build a clone of Airbnb with Next.js. See the first post here.

The first thing we’re going to do is.. we’re going to install Next.js!

You need to have Node.js installed. Check out my h…


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com

This post is part of a new series where we build a clone of Airbnb with Next.js. See the first post here.

The first thing we’re going to do is.. we’re going to install Next.js!

You need to have Node.js installed. Check out my how to install Node.js post if you don’t have it already!

And make sure it’s the latest version (see how to update Node.js).

Installing Node.js will make the npm command available into your command line.

If you are new to using the command line, recommend reading An introduction to the npm package manager, the Unix Shells Tutorial, How to use the macOS terminal and The Bash Shell.

Now that you have npm, create an empty folder anywhere you like, for example in your home folder, and go into it:

mkdir nextbnb
cd nextbnb

and then initialize it as a Next.js project using create-next-app:

npx create-next-app .

Open the project folder using your favorite editor. You can use VS Code.

If you have that installed, you can run code . in your terminal to open the current folder in the editor (see this)

The sample project structure should contain a few files already:

VS Code

Now using the terminal, run npm run dev to start the Next development server.

This will make the app available on port 3000, on localhost.

Open http://localhost:3000 in your browser:

Next working

It’s working! That’s pretty cool. You can play around with the sample app a little bit, if you want.

If this is the first time you see a Next.js app, I recommend you look at it along with a copy of my free Next.js Handbook.

Once you’re ready we can start diving directly into the application we are going to build, starting from creating a list of houses.

Coming tomorrow.


This content originally appeared on flaviocopes.com and was authored by flaviocopes.com


Print Share Comment Cite Upload Translate Updates
APA

flaviocopes.com | Sciencx (2021-12-01T05:00:00+00:00) Airbnb clone, let’s start by installing Next.js. Retrieved from https://www.scien.cx/2021/12/01/airbnb-clone-lets-start-by-installing-next-js/

MLA
" » Airbnb clone, let’s start by installing Next.js." flaviocopes.com | Sciencx - Wednesday December 1, 2021, https://www.scien.cx/2021/12/01/airbnb-clone-lets-start-by-installing-next-js/
HARVARD
flaviocopes.com | Sciencx Wednesday December 1, 2021 » Airbnb clone, let’s start by installing Next.js., viewed ,<https://www.scien.cx/2021/12/01/airbnb-clone-lets-start-by-installing-next-js/>
VANCOUVER
flaviocopes.com | Sciencx - » Airbnb clone, let’s start by installing Next.js. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/01/airbnb-clone-lets-start-by-installing-next-js/
CHICAGO
" » Airbnb clone, let’s start by installing Next.js." flaviocopes.com | Sciencx - Accessed . https://www.scien.cx/2021/12/01/airbnb-clone-lets-start-by-installing-next-js/
IEEE
" » Airbnb clone, let’s start by installing Next.js." flaviocopes.com | Sciencx [Online]. Available: https://www.scien.cx/2021/12/01/airbnb-clone-lets-start-by-installing-next-js/. [Accessed: ]
rf:citation
» Airbnb clone, let’s start by installing Next.js | flaviocopes.com | Sciencx | https://www.scien.cx/2021/12/01/airbnb-clone-lets-start-by-installing-next-js/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.