Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshmerlino/gun-relay
https://github.com/joshmerlino/gun-relay
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/joshmerlino/gun-relay
- Owner: JoshMerlino
- Created: 2022-05-27T01:30:30.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-23T16:24:03.000Z (4 months ago)
- Last Synced: 2024-10-23T22:45:21.404Z (4 months ago)
- Language: TypeScript
- Size: 6.79 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ts-server
### Checks
* [![Code Style Analysis](https://github.com/JoshMerlino/ts-package/actions/workflows/code-style-analysis.yml/badge.svg)](https://github.com/JoshMerlino/ts-package/actions/workflows/code-style-analysis.yml)
* [![Code Quality Analysis](https://github.com/JoshMerlino/ts-package/actions/workflows/code-quality-analysis.yml/badge.svg)](https://github.com/JoshMerlino/ts-package/actions/workflows/code-quality-analysis.yml)
* [![Test CI](https://github.com/JoshMerlino/ts-package/actions/workflows/test-ci.yml/badge.svg)](https://github.com/JoshMerlino/ts-package/actions/workflows/test-ci.yml)### Software
* ubuntu-20.04.1lts
* git-2.25.1
* node-14.16.0
* npm-6.14.11## Getting Started
```bash
# Clone the repo
git clone https://github.com/JoshMerlino/ts-server -b master --single-branch -o upstream my-server
```Move into your new working directory.
```bash
# Install node build tools
sudo apt-get install build-essential -y# Install node modules
npm install
```## Creating API Endpoints
Create a `.ts` file in the `~/api` directory
```typescript
import { Request, Response } from "express";export const route = [
"v1/test",
"v1/test/**"
];export default function api(req: Request, res: Response): void {
res.json({});
}
```