Skip to content

Commit

Permalink
Complete Introduction & Installation Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikmehta8 committed Oct 27, 2024
1 parent e061a17 commit 4d794f4
Show file tree
Hide file tree
Showing 13 changed files with 134 additions and 173 deletions.
8 changes: 8 additions & 0 deletions docs/installation/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Installation",
"position": 2,
"link": {
"type": "generated-index",
"description": "Orion Installation Guide"
}
}
29 changes: 29 additions & 0 deletions docs/installation/prerequisites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
sidebar_position: 1
---

# Prerequisites

Before diving into Orion, you’ll need a few things to get started. Don’t worry, it’s a quick checklist!

## 1. **Node.js & Npm**
Orion is built on top of Node.js and Express, so having the latest stable version of Node.js installed is essential. You can download Node.js from [Node.js Official Website](https://nodejs.org).

```bash
# Verify your Node.js installation. Ensure you have version v22.8.0 or higher.
>>> node -v

# Verify your Npm installation. Ensure you have version v10.8.3 or higher.
>>> npm -v
```

## 2. Git
Git is necessary to clone the Orion starter project and push your awesome changes. If you don't already have Git installed, you can get it from [Git's Official Website](https://git-scm.com).

```bash
# Verify your Git installation.
>>> git -v
```

## 3. Basics of JavaScript & Express
While Orion takes care of most of the heavy lifting, having a basic understanding of JavaScript and Express.js will help you customize and extend Orion with ease. Don’t worry, Orion keeps things friendly and simple!
61 changes: 61 additions & 0 deletions docs/installation/step-by-step-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
sidebar_position: 2
---

# Initiation

Let’s get Orion up and running! Now that you’ve completed the prerequisites, let’s install and configure Orion for your development environment.

## 1. **Clone the Project**
Start by cloning the Orion's repository to your local machine.

```bash
>>> git clone https://github.com/kartikmehta8/orion.git
>>> cd orion # Get into the folder.
```

## 2. Install Dependencies
Run the following command to install all necessary dependencies.

```bash
>>> npm install
```
This will install all the packages defined in the package.json file.

## 3. Set Up Environment Variables
Orion uses environment variables to configure its settings. Create a `.env` file in the root of your project, or rename `.env.sample` to `.env`.

```bash
>>> touch .env
```

Your `.env` file should be structured as follows:

```
PORT=3000
ENVIRONMENT="development"
```

- **PORT:** Specifies the port on which the server should run.
- **ENVIRONMENT:** Indicates the environment mode, either `production` or `development`.

## 4. Run the Application
After setting up the environment variables, start the server.

```bash
>>> npm run dev # For Development
OR
>>> npm start # For Production
```

This will start the Orion server on the specified port (default is `3000`). If everything is set up correctly, you should see a success message in your console.

```bash
[nodemon] starting `node index.js`
[INFO] Visit /visualize to see information about the routes.
[INFO] Server running on port 3000.
```

Congratulations! 🎉

You’ve built a fully-fledged server with everything set up, from controllers and routers to middleware and databases. Follow the console messages to explore what’s happening at `/visualize`, and then return to discuss the commands that Orion offers.
47 changes: 0 additions & 47 deletions docs/intro.md

This file was deleted.

34 changes: 34 additions & 0 deletions docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
sidebar_position: 1
---

# Introduction


:::tip From the creator
ChatGPT helped you get started with the backend in hours instead of days. Orion will help you get started with the backend **in minutes** instead of hours.
:::

Sounds intriguing, doesn't it?

## Orion - Express on Steroids

*What if we told you that all you need to do is run **npm install**, and your Express server is fully configured and ready to go?*

Orion is a highly modular, scalable, and efficient backend framework that sits on top of Express.js. It aims to simplify backend development with its plug-and-play architecture, a customizable CLI, and an easy-to-extend infrastructure.

- **No more complex setup rituals**. Orion’s CLI handles everything for you, so you don't need to chant `npm init` thrice under the moon.
- **No more reinventing the wheel**. Your wheel’s already turbocharged here! 🚀

## Why Choose Orion Over Other Frameworks?

If you’re tired of manually managing routes, middlewares, and connections with existing backend frameworks, then Orion is here to save the day!

### 1. CLI Commands
Most frameworks make you manually define everything and follow 21 different tutorial steps before you can say "Hello World." But Orion's CLI is like your coding assistant that generates everything you need with a simple command. Think of it as having a genie, but without the questionable wish limitations.

### 2. Dynamic Imports
Orion supports modular definitions for routes, controllers, and middleware, making them **pluggable, reusable, and customizable**. You no longer have to deal with lines of unmanageable code stuffed inside `app.js`. Now you can say, "Separate my concerns, routes, controllers, and middleware," and it just works!

### 3. Better than Just Being RESTful
While everyone else is busy trying to "REST" (pun intended), Orion aims to keep you **RESTed and ready**. You get a pre-configured, extendable, and structured system without the overhead.
8 changes: 0 additions & 8 deletions docs/tutorial-basics/_category_.json

This file was deleted.

23 changes: 0 additions & 23 deletions docs/tutorial-basics/congratulations.md

This file was deleted.

34 changes: 0 additions & 34 deletions docs/tutorial-basics/create-a-blog-post.md

This file was deleted.

57 changes: 0 additions & 57 deletions docs/tutorial-basics/create-a-document.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
sidebar_position: 1
---


# Create a Page

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const config = {
items: [
{
label: 'Tutorial',
to: '/docs/intro',
to: '/docs/introduction',
},
{
label: 'Blog',
Expand Down

0 comments on commit 4d794f4

Please sign in to comment.