From bb7e54a8bf84795b49a959ed8d72f1f497b2792c Mon Sep 17 00:00:00 2001 From: Evan Sellers Date: Tue, 7 May 2024 17:53:43 -0400 Subject: [PATCH 1/4] Added Core --- docs/docs.json | 11 +++++++++++ docs/index.mdx | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 docs/docs.json create mode 100644 docs/index.mdx diff --git a/docs/docs.json b/docs/docs.json new file mode 100644 index 0000000..f494bfe --- /dev/null +++ b/docs/docs.json @@ -0,0 +1,11 @@ +{ + "name": "Awesome Project", + "theme": "#ab47bc", + "favicon": "/assets/favicon.ico", + "logo": "https://mycdn.com/awesome-logo.png", + "docsearch": { + "appId": "...", + "apiKey": "...", + "indexName": "..." + } +} \ No newline at end of file diff --git a/docs/index.mdx b/docs/index.mdx new file mode 100644 index 0000000..8578d09 --- /dev/null +++ b/docs/index.mdx @@ -0,0 +1,6 @@ +--- +title: Overview +description: Instant Open Source docs with zero configuration. +--- + +# Hello World \ No newline at end of file From 76b0c26abf9ef75cd1db6b6376761f0c8326ec64 Mon Sep 17 00:00:00 2001 From: Evan Sellers Date: Tue, 7 May 2024 18:15:09 -0400 Subject: [PATCH 2/4] Update docs.json --- docs/docs.json | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index f494bfe..a2d96a5 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1,11 +1,3 @@ { - "name": "Awesome Project", - "theme": "#ab47bc", - "favicon": "/assets/favicon.ico", - "logo": "https://mycdn.com/awesome-logo.png", - "docsearch": { - "appId": "...", - "apiKey": "...", - "indexName": "..." - } + "name": "Awesome Project" } \ No newline at end of file From ab115e1df72aca9b55e4f370651f109c251e34dd Mon Sep 17 00:00:00 2001 From: Evan Sellers Date: Tue, 7 May 2024 18:36:55 -0400 Subject: [PATCH 3/4] Updated --- docs.json | 25 +++++++++++++++++++++++++ docs/docs.json | 3 --- docs/index.mdx | 3 ++- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 docs.json delete mode 100644 docs/docs.json diff --git a/docs.json b/docs.json new file mode 100644 index 0000000..343bfb6 --- /dev/null +++ b/docs.json @@ -0,0 +1,25 @@ +{ + "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", "/"], + ["Installation", "/installation"], + ["Project Structure", "/structure"] + ] + ], [ + "Building Your Application", + [ + ["Defining Routes", "/"], + ["Dynamic Routes", "/"], + ["Endpoints", "/"], + ["Static Assets", "/"] + ] + ], [ + "API Reference", + [ + ["Sherpa CLI", "/api/cli"] + ] + ]] +} \ No newline at end of file diff --git a/docs/docs.json b/docs/docs.json deleted file mode 100644 index a2d96a5..0000000 --- a/docs/docs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "Awesome Project" -} \ No newline at end of file diff --git a/docs/index.mdx b/docs/index.mdx index 8578d09..0d1828a 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -3,4 +3,5 @@ title: Overview description: Instant Open Source docs with zero configuration. --- -# Hello World \ No newline at end of file +# SherpaJS - Serverless Web Framework +This site is under development. \ No newline at end of file From d842ce8415076fdff14d3a117207bd3e85e34672 Mon Sep 17 00:00:00 2001 From: Evan Sellers Date: Tue, 7 May 2024 19:07:10 -0400 Subject: [PATCH 4/4] Updated Docs --- docs.json | 20 ++++++---- docs/api/cli.mdx | 98 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 8 deletions(-) create mode 100644 docs/api/cli.mdx diff --git a/docs.json b/docs.json index 343bfb6..827a132 100644 --- a/docs.json +++ b/docs.json @@ -4,22 +4,26 @@ "sidebar": [[ "Getting Started", [ - ["Overview", "/"], - ["Installation", "/installation"], - ["Project Structure", "/structure"] + ["Overview - WIP", "/"], + ["Installation - WIP", "/installation"], + ["Project Structure - WIP", "/structure"] ] ], [ "Building Your Application", [ - ["Defining Routes", "/"], - ["Dynamic Routes", "/"], - ["Endpoints", "/"], - ["Static Assets", "/"] + ["Defining Routes - WIP", "/"], + ["Dynamic Routes - WIP", "/"], + ["Endpoints - WIP", "/"], + ["Static Assets - WIP", "/"] ] ], [ "API Reference", [ - ["Sherpa CLI", "/api/cli"] + ["Response - WIP", "/api/response"], + ["Request - WIP", "/api/request"], + ["Headers - WIP", "/api/headers"], + ["Parameters - WIP", "/api/parameters"], + ["SherpaJS CLI", "/api/cli"] ] ]] } \ No newline at end of file diff --git a/docs/api/cli.mdx b/docs/api/cli.mdx new file mode 100644 index 0000000..bbfc427 --- /dev/null +++ b/docs/api/cli.mdx @@ -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. + + +
+ + +## 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 +``` + + +
+ + +## 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 + + +
+ + +### Build Command +Build SherpaJS Server. +```bash +sherpa build [options] +``` + +#### Options: + - `-i`, `--input ` path to SherpaJS server, defaults to current directory + - `-o`, `--output ` path to server output, defaults to input directory + - `-b`, `--bundler ` 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 + + + +
+ + +### 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 to SherpaJS server, defaults to current directory + - `-p`, `--port ` port number (default: "3000") + - `-h`, `--help` display help for command + + +
+ + +### Clean Command +Remove SherpaJS Build Directories. +```bash +sherpa clean [options] +``` + +#### Options: + - `-i`, `--input ` path to SherpaJS build directories, defaults to current directory + - `-h`, `--help` display help for command +