How to Install Snippet Box on Windows 11
Snippet Box is a simple and efficient web application that allows users to store and manage code snippets. This tutorial will guide you through the process of installing Snippet Box on Windows 11.
Prerequisites
Before we begin, ensure that you have the following prerequisites installed on your Windows 11 system:
- Git: To clone the Snippet Box repository.
- Node.js >= 12: To execute JavaScript on the server side.
- MySQL >= 5.7: To store the Snippet Box data.
Steps to Install Snippet Box
- Open the command prompt and navigate to a directory where you would like to clone the Snippet Box repository.
cd C:\path\to\directory
- Clone the Snippet Box repository using Git.
git clone https://github.com/pawelmalak/snippet-box.git
- Navigate to the cloned repository directory.
cd snippet-box
- Install the dependencies using npm.
npm install
- Copy the
.env.examplefile to.envand edit the file with your local MySQL connection details.
cp .env.example .env
notepad .env
- Create the Snippet Box database.
npm run createdb
- Run the Snippet Box application.
npm run start
The Snippet Box application should now be running on http://localhost:4000.
Conclusion
You have successfully installed Snippet Box on a Windows 11 system. You can now use it to store and manage your code snippets.