CLI Setup
This guide covers the installation of Nocto using CLI.
To install the Nocto, you need to have several prerequisites in place. Here's a list of all the essential pre-requisites for setting up and working on this project.
Prerequisites
System Requirements
- Node.js: Make sure you have Node.js installed. The project uses
npm
, which comes with Node.js. Install Node.js from here. - NPM or Yarn: Since the project uses
npm
commands, ensure that npm is installed with Node.js. Alternatively, you can use Yarn if preferred.
node -v
npm -v
Installation
Create new project
First, use NPX to create a Nocto project. Run the command:
npx @rsc-labs/create-nocto-app <project-name>
Change the directory to the project folder:
cd <project-name>
Install Dependencies
Use npm or yarn to install all the required dependencies:
npm install
or
yarn install
This will install all the dependencies listed in the package.json file.
Install Medusa Backend
Required:
Nocto is the frontend application. To have it working properly, you need to also run Medusa Backend.
Start the Medusa backend. Install Medusa using documentation from here Medusa Installation.
Setup Medusa Backend
Before running Medusa, disable default admin - Medusa Admin Disabled.
Also, you need to setup CORS - by default Nocto will run on port 5173, so you need to this port to medusa-config.ts
.
For details about setting the CORS, see Medusa Config Docs.
Because Nocto is the new admin, you care about http.authCors
and http.adminCors
.
Run Medusa Backend
Once you’ve made changes, run Medusa Backend, for instance in Development Mode
Run Nocto
When your Medusa Backend is running, you can now run the Nocto. Go to your Nocto project and just run:
npm dev
or
yarn dev
The app will be available at:
http://localhost:5173