https://github.com/platform-kit/server
Self-Hosted Serverless Infrastructure
https://github.com/platform-kit/server
api express lambda node serverless static-site-genrator typescript
Last synced: 8 months ago
JSON representation
Self-Hosted Serverless Infrastructure
- Host: GitHub
- URL: https://github.com/platform-kit/server
- Owner: platform-kit
- License: mit
- Created: 2021-06-01T08:53:16.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-07-26T08:02:45.000Z (over 3 years ago)
- Last Synced: 2023-03-02T23:47:23.113Z (about 3 years ago)
- Topics: api, express, lambda, node, serverless, static-site-genrator, typescript
- Language: HTML
- Homepage: https://www.platformkit.com
- Size: 645 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
PlatformKit Server
Self-Hosted Serverless Infrastructure
Deploy serverless functions & static site generators via Express on any cloud platform.
**Built with:**
**Deploy with:**
**License:**


## Features
- Deploy **static site generator** with custom build commands.
- Deploy **serverless functions** on any major cloud provider.
- Deploy a **PostgreSQL database** with zero config.
## Benefits
- Prevents vendor lock-in (easily move to/from hosting platforms).
- Deploy your front-end, back-end, and database in one step.
- Predictable billing + configurable auto-scaling.
- Scale via serverless functions when necessary.
## Local Development
Clone the project
```bash
git clone https://github.com/platform-kit/server pk-server
```
Go to the project directory
```bash
cd pk-server
```
Install dependencies
```bash
npm install && npm run pull && npm run build-functions && npm run build
```
Start the server
```bash
npm run dev
```
A local instance is now running at `https://localhost:3000`
## Configuration
Before use, you will need to add the following environment variables to your .env file
The `GITHUB_REPOSITORY` variable is the repo containing your static site generator.
The `BUILD_COMMAND` is the command that is used to install/run your site generator.
The `PUBLIC_DIRECTORY` variable specifies which directory to serve.
The `GITHUB_TOKEN` is only necessary if your repo is private.
The `PORT` is 3000 by default, change it if 3000 is taken.
```
# GitHub
GITHUB_REPOSITORY=platform-kit/platformkit-ui
GITHUB_TOKEN=STRING
# Static Site Generator
BUILD_COMMAND=npm i; npm run build;
PUBLIC_DIRECTORY=dist
```
## Deployment
To deploy to the cloud, simply click one of the buttons below.