Skip to content

Commit

Permalink
arrange-files
Browse files Browse the repository at this point in the history
  • Loading branch information
walidelnozahy committed Aug 23, 2021
1 parent 2a2f136 commit f008630
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 76 deletions.
11 changes: 0 additions & 11 deletions docs/apps/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ last_modified_date: 2021-05-30

# Creating API Routes

{: .no_toc }

<details open markdown="block">
<summary>
Table of contents
</summary>
{: .text-delta }
1. TOC
{:toc}
</details>

API routes in Serverless Cloud use Express.js syntax and methods. For more information regarding Express.js, visit [http://expressjs.com/en/4x/api.html](http://expressjs.com/en/4x/api.html).

## Creating an API
Expand Down
11 changes: 0 additions & 11 deletions docs/apps/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,10 @@ last_modified_date: 2021-05-30

# Serverless Data

{: .no_toc }

Serverless Data is a super fast, automatically scalable datastore that's built in to Serverless Cloud. It's capable of storing simple K/V items, or massive collections of complex objects that can be queried on multiple dimensions, sorted, and paginated. With single-digit millisecond response times, it provides enough power to cover your most common needs and use cases.

With Serverless Data, **your data is just there** as part of your application's runtime. No connection strings, credentials, capacity planning, or database maintenance. You can use the Serverless Cloud `data` helper to `get`, `set`, and `remove` data whenever you need access to state. Plus, Serverless Data is isolated to each **INSTANCE**, giving every developer, stage, and preview build of a **SERVICE** a completely independent copy of your application's data.

<details open markdown="block">
<summary>
Table of contents
</summary>
{: .text-delta }
1. TOC
{:toc}
</details>

## Using Serverless Data

Access to Serverless Data is automatically included in your runtime environment. It provides a simple interface for persisting and retrieving state. By default, Serverless Data is available through the `data` variable as defined by the `require` statement at the top of the `index.js` file. Serverless Data makes API calls in order to set and retrieve data, so any route/function that calls a Serverless Data method must use `async/await`.
Expand Down
10 changes: 5 additions & 5 deletions docs/apps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ You can then use the `api`, `data`, `schedule`, and `params` helpers to build yo

### Learn more about:

[APIs](/cloud/apps/api.html){: .btn .btn-primary .fs-5 .mt-4 .mb-md-0 .mr-2 }
[Serverless Data](/cloud/apps/data.html){: .btn .btn-primary .fs-5 .mt-4 .mb-md-0 .mr-2 }
[Scheduled Tasks](/cloud/apps/schedule.html){: .btn .btn-primary .fs-5 .mt-4 .mb-md-0 }
[Params](/cloud/apps/params.html){: .btn .btn-primary .fs-5 .mt-4 .mb-md-0 .mr-2 }
[Using Typescript](/cloud/apps/typescript.html){: .btn .btn-primary .fs-5 .mt-4 .mb-md-0 .mr-2 }
[APIs](/cloud/apps/api.html)
[Serverless Data](/cloud/apps/data.html)
[Scheduled Tasks](/cloud/apps/schedule.html)
[Params](/cloud/apps/params.html)
[Using Typescript](/cloud/apps/typescript.html)
11 changes: 0 additions & 11 deletions docs/apps/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,8 @@ last_modified_date: 2021-05-30

# Parameters

{: .no_toc }

Serverless Cloud supports parameters, which can store secrets that your application needs to function.

<details open markdown="block">
<summary>
Table of contents
</summary>
{: .text-delta }
1. TOC
{:toc}
</details>

## Setting parameters

Parameters are configured via the dashboard. Parameters are first specified per service, and then overriden per instance.
Expand Down
11 changes: 0 additions & 11 deletions docs/apps/schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,8 @@ last_modified_date: 2021-05-30

# Scheduling Tasks

{: .no_toc }

Serverless Cloud also supports scheduled tasks, which you can create using the `schedule` helper. You can either use the `.every()` method for having tasks repeat on a regular time interval.Or you can use the `.cron()` method to have more fine-grained control.

<details open markdown="block">
<summary>
Table of contents
</summary>
{: .text-delta }
1. TOC
{:toc}
</details>

## Scheduling tasks with `.every()`

If you know you need a task to repeat every hour, or every 5 days, you can use the `.every()` method. This method takes two arguments, a **rate expression** and the function you'd like to run.
Expand Down
11 changes: 0 additions & 11 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,10 @@ last_modified_date: 2021-08-20

# CLI Reference

{: .no_toc }

The following CLI commands are available to develop, manage, and deploy instances. These are subject to change.

**Current CLI Version:** `v0.0.22`

<details open markdown="block">
<summary>
Table of contents
</summary>
{: .text-delta }
1. TOC
{:toc}
</details>

## `cloud [--seed] [--org] [--service]`

Enables interactive development mode and syncs and deploys local changes to your **personal instance**. This will watch your current directory and immediately sync and publish any changes you save. You can enable automatic data reseeding by passing the optional `--seed` flag. When automatic seeding is enabled, changes saved to your `data.json` file will update your **personal instance**'s data. You can update the organization and/or service of the app attached to your personal instance by passing the optional --org and --service flags respevctively.
Expand Down
2 changes: 1 addition & 1 deletion docs/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ Workflows are meant to be flexible, giving each unique team (or single developer

### Want to get started building apps on Serverless Cloud?

[Sign up for early access](https://www.serverless.com/cloud){: .btn .btn-primary .fs-5 .mt-4 .mb-md-0 }
[Sign up for early access](https://www.serverless.com/cloud)
29 changes: 14 additions & 15 deletions examples/default/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
# Serverless Cloud Example Application

This application is a sample to-do app build powered by React, and yes Serverless Cloud!
You now own a personal development instance on Serverless Cloud. Just play with the code and watch changes synced in seconds.
This application is a sample to-do app build powered by React, and yes Serverless Cloud!
You now own a personal development instance on Serverless Cloud. Just play with the code and watch changes synced in seconds.

## APIs

Note that several endpoints are already defined by using the `api` object in `index.js`. You can create new API routes or update the existing ones to see the effect.
Note that several endpoints are already defined by using the `api` object in `index.js`. You can create new API routes or update the existing ones to see the effect.
More information about APIs can be found [here](https://serverless.github.io/cloud/apps/api.html).

## Serverless Data

Serverless Data is super-fast(single-digit miliseconds response time) automatically scaleable datastore that is capable of storing simple K/V items, or massive collections of complex objects that can be queried on multiple dimensions, sorted, and paginated.
Serverless Data is super-fast(single-digit miliseconds response time) automatically scaleable datastore that is capable of storing simple K/V items, or massive collections of complex objects that can be queried on multiple dimensions, sorted, and paginated.
You don't need to think about maintenance and capacity planning while Serverless Cloud automatically takes care of it backed by AWS DynamoDB Global Tables.
Serverless Data is just there as a part of runtime so you don't need to provide credentialls, connection strings etc. All you need to do is to write code to get, set, or remove data. Note that Serverless Data makes API calls in order to set and retrieve data, so any route/function that calls a Serverless Data method must use `async/await`. There's already a data in your sample application seeded from `data.json` file in this directory.
Serverless Data is just there as a part of runtime so you don't need to provide credentialls, connection strings etc. All you need to do is to write code to get, set, or remove data. Note that Serverless Data makes API calls in order to set and retrieve data, so any route/function that calls a Serverless Data method must use `async/await`. There's already a data in your sample application seeded from `data.json` file in this directory.

You can import and export data to/from your personal development instance by typing `import` and `export` while you're in Cloud Shell or you can just directly type `cloud import` or `cloud export` without starting the Cloud Shell.

More information about Serverless Data can be found [here](https://serverless.github.io/cloud/apps/data.html).

## Schedules

Serverless Cloud lets you create scheduled tasks using either `.every()` or `.cron()` methods. In this way, you can build automation for periodic tasks like batch processing etc.
Serverless Cloud lets you create scheduled tasks using either `.every()` or `.cron()` methods. In this way, you can build automation for periodic tasks like batch processing etc.

More information about Schedules can be found [here](https://serverless.github.io/cloud/apps/schedule.html).

## Testing

Serverless Cloud has built-in support for automated unit and integration testing. See the tests written for the sample app under tests/integration folder. You can write tests based on [Jest testing framework](https://jestjs.io/){:target="_blank"}.
Serverless Cloud has built-in support for automated unit and integration testing. See the tests written for the sample app under tests/integration folder. You can write tests based on [Jest testing framework](https://jestjs.io/).
Just type `test` when you're in Cloud Shell or type `cloud test` from your terminal to run the tests on your personal development instance.

More information about testing can be found [here](https://serverless.github.io/cloud/apps/testing.html).


## CLI and Cloud Shell

Serverless Cloud provides a seamless CLI experience to manage the service you built on Serverless Cloud. You can type `cloud start` or `cloud` when you are in the root directory of a Serverless Cloud project. This will trigger the Cloud Shell where you can run commands to list/delete your instances and services, share/clone the instances, import/export data to/from your personal development instances. All the available cloud commands can be seen when you type `help` from Cloud Shell or `cloud help` from your terminal.
Expand All @@ -40,15 +39,15 @@ More information about the CLI can be found [here](https://serverless.github.io/

## Development Workflows

Serverless Cloud provides you with the personal development environment that's accessible you and only you. The URL for it is NOT accessible unless you are in personal development mode.
When you need to show your work to others or deploy applications so the rest of the world can see it, some handy commands from CLI will be helpful.
Serverless Cloud provides you with the personal development environment that's accessible you and only you. The URL for it is NOT accessible unless you are in personal development mode.
When you need to show your work to others or deploy applications so the rest of the world can see it, some handy commands from CLI will be helpful.

* Type `share` from Cloud Shell when you need to share an instance that contains both code and data with your colleagues and continue working in your personal development environment freely.
* Type `deploy <stage>` when you need to deploy your code to a permanent stage and make it accessible to your CI tool or your users.
* Type `clone <stage>` when you need to copy both code and data of an instance to your personal development data and reproduce a bug on a stage.
- Type `share` from Cloud Shell when you need to share an instance that contains both code and data with your colleagues and continue working in your personal development environment freely.
- Type `deploy <stage>` when you need to deploy your code to a permanent stage and make it accessible to your CI tool or your users.
- Type `clone <stage>` when you need to copy both code and data of an instance to your personal development data and reproduce a bug on a stage.

More information about development workflows can be found [here](https://serverless.github.io/cloud/workflows.html).

## Feedback

Many parts of this are still experimental, so please keep that in mind when testing. Please log any issues and additional feedback can be sent to cloud@serverless.com.
Many parts of this are still experimental, so please keep that in mind when testing. Please log any issues and additional feedback can be sent to cloud@serverless.com.

0 comments on commit f008630

Please sign in to comment.