Quick Start
This guide shows the fastest way to create and run your first OzeanJs project using the Ozean CLI.
Prerequisites
Section titled “Prerequisites”Ensure you have Bun installed on your machine.
Step 1: Create a New Project with the CLI
Section titled “Step 1: Create a New Project with the CLI”You don’t need to install our CLI beforehand. You can use the bunx
command to download and run it immediately.
Open your terminal and run the command:
bunx ozean-cli new my-awesome-app
What does this command do?
bunx
: Downloads and runsozean-cli
temporarily without a global installation.new my-awesome-app
: Instructs the CLI to create a new project in a folder namedmy-awesome-app
and automatically install all necessary dependencies.
Once the command is finished, navigate into your project folder:
cd my-awesome-app
Step 2: Run the Development Server
Section titled “Step 2: Run the Development Server”Run your application in development mode with the command:
bun run index
(This script is already defined in the package.json
of the generated project.)
You should see a message in your terminal indicating that your application is running on http://localhost:3000
.
Step 3: Test the Application
Section titled “Step 3: Test the Application”Open another terminal and use curl
to test if the server is working correctly:
curl http://localhost:3000/cats
Expected Result:
Hello cat.
That’s it! In just 3 simple steps, your first OceanJs project is ready to go. Try opening the project in your favorite editor and start modifying the code in the src
folder!