<aside> <img src="https://prod-files-secure.s3.us-west-2.amazonaws.com/c3942e98-5f9b-47e8-8676-2f507eb3b25c/344d0d49-169c-456a-aad9-0015ece6b9ff/Group_2865.png" alt="https://prod-files-secure.s3.us-west-2.amazonaws.com/c3942e98-5f9b-47e8-8676-2f507eb3b25c/344d0d49-169c-456a-aad9-0015ece6b9ff/Group_2865.png" width="40px" /> Home
</aside>
To install Node.js, follow these steps based on your operating system.
Visit the Node.js Official Website:
Go to https://nodejs.org to download Node.js. You will see two main versions:
Choose the LTS version for production-ready applications or the Current version if you're experimenting with new features.
Download the Appropriate Installer:
Windows: Click the Windows Installer (.msi) for your system (32-bit or 64-bit).
macOS: Click the macOS Installer (.pkg).
Linux: For Debian-based systems (like Ubuntu), you can use a package manager:For other Linux distributions, follow the installation guide provided on the Node.js website.
curl -fsSL <https://deb.nodesource.com/setup_lts.x> | sudo -E bash -
sudo apt-get install -y nodejs
Follow the Installation Prompts:
Once the installer is downloaded, follow the step-by-step instructions to complete the installation. Make sure to install npm (Node Package Manager), which is bundled with Node.js by default.
Verify Installation:
Open a terminal (Command Prompt on Windows, Terminal on macOS/Linux) and run the following commands to check if Node.js and npm are installed correctly:
node --version
npm --version
The output should display the installed version numbers of both Node.js and npm, which confirms the successful installation.
Navigate to the frontend
directory to set up the Next.js app:
cd web app
npm install
.env.local
file in the frontend
directory and add your environment variables:
NEXT_PUBLIC_API_BASE_URL="<http://64.227.117.226/api>" // Backend URL
NEXT_PUBLIC_ENV="production"
// stripe Keys
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_**********************************************************************
STRIPE_SECRET_KEY=sk_test_***********************************************
npm run dev
Composer is a dependency manager for PHP that you'll need to install Laravel. Follow the steps based on your operating system.
Download the Composer Setup:
Visit the Composer official website and download the Composer-Setup.exe file for Windows.
Run the Installer:
During the installation process, make sure PHP is selected in your system's PATH, or provide the path to your PHP installation manually.
Verify Installation:
After installation, open the Command Prompt and run:
composer --version
If everything is correctly installed, you should see the version of Composer.
Install Composer:
Open your terminal and run the following commands to download and install Composer globally:
php -r "copy('<https://getcomposer.org/installer>', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e2b881f00e0b09e0c3b2b33c4411b734f51f32cd6e6e8f1a5a19') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
Move Composer to a global path:
sudo mv composer.phar /usr/local/bin/composer
Verify Installation:
Run the following command to ensure Composer was installed correctly:
composer --version
Once Composer is installed, you can now use it to install Laravel.
Open a Terminal or Command Prompt:
Ensure Composer is globally available.
Install Laravel via Composer:
Run the following command to install the Laravel installer globally:
bash
Copy code
composer global require laravel/installer
Ensure Laravel Installer is in PATH:
On macOS and Linux, you might need to ensure that Composer's global vendor/bin
directory is in your PATH. Add this line to your .bashrc
, .bash_profile
, or .zshrc
file:
export PATH="$HOME/.composer/vendor/bin:$PATH"
For Windows, it should be automatically added.
Navigate to Your Project:
cd cleartext_ai
Run Laravel's Development Server:
Start the Laravel development server by running:
php artisan serve
This will start a local development server at http://localhost:8000
.
After running php artisan serve
, open your browser and go to:
<http://localhost:8000>
You should see the Laravel welcome page, which confirms that Laravel has been installed and is running correctly.