Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs #116

Merged
merged 4 commits into from
May 7, 2024
Merged

Docs #116

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "SherpaJS",
"description": "Module and Reusable Microservice Platform. Build and modularize custom API endpoints, inspired by NextJS APIs. Export to Vercel and ExpressJS.",
"sidebar": [[
"Getting Started",
[
["Overview - WIP", "/"],
["Installation - WIP", "/installation"],
["Project Structure - WIP", "/structure"]
]
], [
"Building Your Application",
[
["Defining Routes - WIP", "/"],
["Dynamic Routes - WIP", "/"],
["Endpoints - WIP", "/"],
["Static Assets - WIP", "/"]
]
], [
"API Reference",
[
["Response - WIP", "/api/response"],
["Request - WIP", "/api/request"],
["Headers - WIP", "/api/headers"],
["Parameters - WIP", "/api/parameters"],
["SherpaJS CLI", "/api/cli"]
]
]]
}
98 changes: 98 additions & 0 deletions docs/api/cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title: SherpaJS CLI
description: The SherpaJS CLI allows you to develop, build, start your application, and more.
---

# SherpaJS CLI

The SherpaJS command-line interface (CLI) allows you to develop, build, start your application, and
more.


<br/>


## Installation
To install the SherpaJS CLI, simply run the following command:

```bash
npm install sherpa-core -g
```

This command will globally install the SherpaJS core package, enabling you to
utilize its features across your system. Once installed, you can easily run
the SherpaJS command-line interface (CLI) using the following command:

```bash
sherpa
```


<br/>


## Commands
CLI for SherpaJS - Modular Microservices Framework

```bash
sherpa [options] [command]
```

#### Options:
- `-V`, `--version` output the version number
- `-h`, `--help` display help for command

#### Commands:
- `build [options]` Build SherpaJS Server
- `start [options]` Start SherpaJS Server Locally
- `clean [options]` Remove SherpaJS Build Directories
- `help [command]` display help for command


<br/>


### Build Command
Build SherpaJS Server.
```bash
sherpa build [options]
```

#### Options:
- `-i`, `--input <path>` path to SherpaJS server, defaults to current directory
- `-o`, `--output <path>` path to server output, defaults to input directory
- `-b`, `--bundler <type>` platform bundler ("**Vercel**", "*local**", *default: "local"*)
- `-v`, `--variable [key values...]` Specify optional environment variables as key=value pairs Ex. `foo=bar test="1234 HI"`
- `--dev` enable development mode, does not minify output
- `-h`, `--help` display help for command



<br/>


### Start Command
Start SherpaJS Server Locally. Ensure you have created a [local build](/api/cli#build-command).
```bash
sherpa start [options]
```

#### Options:
- `-i`, `--input <path>` path to SherpaJS server, defaults to current directory
- `-p`, `--port <number>` port number (default: "3000")
- `-h`, `--help` display help for command


<br/>


### Clean Command
Remove SherpaJS Build Directories.
```bash
sherpa clean [options]
```

#### Options:
- `-i`, `--input <path>` path to SherpaJS build directories, defaults to current directory
- `-h`, `--help` display help for command

7 changes: 7 additions & 0 deletions docs/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Overview
description: Instant Open Source docs with zero configuration.
---

# SherpaJS - Serverless Web Framework
This site is under development.
Loading