-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2fee6e6
commit 48d20a1
Showing
6 changed files
with
155 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,32 @@ | ||
// import fs from 'node:fs' | ||
import { defineConfig } from 'vitepress' | ||
// import { config } from '../../src/config' | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: 'tlsx Docs', | ||
description: 'A better developer environment.', | ||
title: 'bunfig', | ||
description: 'A smart config leader for Bun projects.', | ||
cleanUrls: true, | ||
|
||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
nav: [ | ||
{ text: 'Home', link: '/' }, | ||
{ text: 'Examples', link: '/markdown-examples' }, | ||
{ text: 'Docs', link: '/intro' }, | ||
{ text: 'Changelog', link: 'https://github.com/stacksjs/bunfig/releases' }, | ||
], | ||
|
||
sidebar: [ | ||
{ | ||
text: 'Examples', | ||
text: 'Get Started', | ||
items: [ | ||
{ text: 'Markdown Examples', link: '/markdown-examples' }, | ||
{ text: 'Runtime API Examples', link: '/api-examples' }, | ||
{ text: 'Introduction', link: '/intro' }, | ||
{ text: 'Install', link: '/install' }, | ||
], | ||
}, | ||
], | ||
|
||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/stacksjs/stacks' }, | ||
{ icon: 'github', link: 'https://github.com/stacksjs/bunfig' }, | ||
{ icon: 'bluesky', link: 'https://bsky.app/profile/chrisbreuer.dev' }, | ||
{ icon: 'twitter', link: 'https://twitter.com/stacksjs' }, | ||
], | ||
}, | ||
// vite: { | ||
// server: { | ||
// https: { | ||
// cert: fs.readFileSync(config.certPath), | ||
// key: fs.readFileSync(config.keyPath), | ||
// }, | ||
// }, | ||
// }, | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
--- | ||
# https://vitepress.dev/reference/default-theme-home-page | ||
layout: home | ||
|
||
hero: | ||
name: "tlsx" | ||
text: "HTTPS for your dev environment" | ||
tagline: Automatically ensure your local development environment uses HTTPS | ||
text: "HTTPS for localhost" | ||
tagline: "Certificates for your local machine in a zero-config & zero-setup way." | ||
actions: | ||
- theme: brand | ||
text: Markdown Examples | ||
link: /markdown-examples | ||
text: Documentation | ||
link: /intro | ||
- theme: alt | ||
text: API Examples | ||
link: /api-examples | ||
text: View on GitHub | ||
link: https://github.com/stacksjs/tlsx | ||
|
||
features: | ||
- title: Feature A | ||
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit | ||
- title: Feature B | ||
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit | ||
- title: Feature C | ||
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit | ||
- title: SSL Support | ||
icon: 🛡️ | ||
details: HTTPS by default | ||
- title: Auto-Renew | ||
icon: 🔄 | ||
details: Automatically renews expired certificates | ||
- title: Zero-Config | ||
icon: 🚀 | ||
details: Yet, highly configurable | ||
- title: Library or CLI | ||
icon: 💻 | ||
details: Use as a library or as a CLI | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
## Install | ||
|
||
```bash | ||
bun install -d @stacksjs/tlsx | ||
|
||
# or, invoke immediately | ||
bunx @stacksjs/tlsx | ||
npx @stacksjs/tlsx | ||
``` | ||
|
||
Please note, we are looking to publish this package to npm under the name `tlsx`. _Hoping npm will release the name for us._ | ||
|
||
<!-- _Alternatively, you can install:_ | ||
```bash | ||
brew install tlsx # wip | ||
pkgx install tlsx # wip | ||
``` --> | ||
|
||
## Usage | ||
|
||
There are two ways of using this reverse proxy: _as a library or as a CLI._ | ||
|
||
### Library | ||
|
||
Given the npm package is installed: | ||
|
||
```ts | ||
import type { AddCertOptions, CAOptions, CertificateOptions, TlsConfig, TlsOptions } from '@stacksjs/tlsx' | ||
import { addCertToSystemTrustStoreAndSaveCerts, config, forge, generateCert, pki, storeCertificate, tls } from '@stacksjs/tlsx' | ||
|
||
// ... | ||
``` | ||
|
||
### CLI | ||
|
||
```bash | ||
# more docs incoming | ||
tlsx --help | ||
tlsx version | ||
``` | ||
|
||
## Configuration | ||
|
||
The Reverse Proxy can be configured using a `tls.config.ts` _(or `tls.config.js`)_ file and it will be automatically loaded when running the `tlsx` command. | ||
|
||
```ts | ||
// tlsx.config.{ts,js} | ||
import type { TlsConfig } from '@stacksjs/tlsx' | ||
|
||
export default { | ||
domain: 'stacks.localhost', | ||
hostCertCN: 'stacks.localhost', | ||
caCertPath: path.join(os.homedir(), '.stacks', 'ssl', `tlsx.localhost.ca.crt`), | ||
certPath: path.join(os.homedir(), '.stacks', 'ssl', `tlsx.localhost.crt`), | ||
keyPath: path.join(os.homedir(), '.stacks', 'ssl', `tlsx.localhost.crt.key`), | ||
altNameIPs: ['127.0.0.1'], | ||
altNameURIs: ['localhost'], | ||
organizationName: 'stacksjs.org', | ||
countryName: 'US', | ||
stateName: 'California', | ||
localityName: 'Playa Vista', | ||
commonName: 'stacks.localhost', | ||
validityDays: 180, | ||
verbose: false, | ||
} satisfies TlsConfig | ||
``` | ||
|
||
_Then run:_ | ||
|
||
```bash | ||
tlsx | ||
``` | ||
|
||
To learn more, head over to the [documentation](https://tlsx.sh/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Introduction | ||
|
||
`tlsx` is a | ||
|
||
## Features | ||
|
||
- SSL Support _(HTTPS by default)_ | ||
- Automatically Renews Expired Certificates | ||
- Configurable | ||
|
||
## Changelog | ||
|
||
Please see our [releases](https://github.com/stacksjs/tlsx/releases) page for more information on what has changed recently. | ||
|
||
## Contributing | ||
|
||
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details. | ||
|
||
## Community | ||
|
||
For help, discussion about best practices, or any other conversation that would benefit from being searchable: | ||
|
||
[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions) | ||
|
||
For casual chit-chat with others using this package: | ||
|
||
[Join the Stacks Discord Server](https://discord.gg/stacksjs) | ||
|
||
## Postcardware | ||
|
||
Two things are true: Stacks OSS will always stay open-source, and we do love to receive postcards from wherever Stacks is used! 🌍 _We also publish them on our website._ | ||
|
||
Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States 🌎 | ||
|
||
## Sponsors | ||
|
||
We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us. | ||
|
||
- [JetBrains](https://www.jetbrains.com/) | ||
- [The Solana Foundation](https://solana.com/) | ||
|
||
## Credits | ||
|
||
- [Chris Breuer](https://github.com/chrisbbreuer) | ||
- [All Contributors](https://github.com/stacksjs/tlsx/contributors) | ||
|
||
## License | ||
|
||
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/tlsx/tree/main/LICENSE.md) for more information. | ||
|
||
Made with 💙 |
This file was deleted.
Oops, something went wrong.