-
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.
chore: setup basic client and server implementation (#1)
- Loading branch information
1 parent
538881a
commit 92bcca7
Showing
30 changed files
with
6,147 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
HOSTNAME=http://localhost | ||
CLIENT_PORT=5173 | ||
SERVER_PORT=3000 |
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,21 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
target-branch: main | ||
directory: "." | ||
schedule: | ||
interval: "daily" | ||
versioning-strategy: increase | ||
groups: | ||
npm: | ||
patterns: | ||
- "*" | ||
- package-ecosystem: "github-actions" | ||
target-branch: main | ||
directory: ".github/workflows" | ||
schedule: | ||
interval: "daily" | ||
groups: | ||
gha: | ||
patterns: | ||
- "*" |
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,25 @@ | ||
{ | ||
"packages": { | ||
".": { | ||
"include-component-in-tag": false, | ||
"release-type": "node", | ||
"changelog-sections": [ | ||
{ | ||
"type": "feat", | ||
"section": "Features", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Bug Fixes", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "chore", | ||
"section": "Chores", | ||
"hidden": false | ||
} | ||
] | ||
} | ||
} | ||
} |
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,3 @@ | ||
{ | ||
".": "0.0.0" | ||
} |
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,20 @@ | ||
name: cd | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release-please: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Release Please | ||
uses: googleapis/release-please-action@v4.1.3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
config-file: .github/release-please-config.json | ||
manifest-file: .github/release-please-manifest.json |
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,23 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4.1.7 | ||
- name: Setup Volta | ||
uses: volta-cli/action@v4.2.1 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Test project | ||
run: npm run test |
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,8 @@ | ||
# runtime | ||
.env | ||
node_modules | ||
|
||
# application | ||
coverage | ||
out | ||
./api/main.cjs |
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 @@ | ||
# Changelog |
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,2 +1,9 @@ | ||
# chat | ||
# Chat | ||
|
||
A hosted chat app solution | ||
|
||
Roadmap | ||
|
||
## License | ||
|
||
MIT |
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,11 @@ | ||
import request from 'supertest' | ||
import { describe, it, expect } from 'vitest' | ||
|
||
import app from './main' | ||
|
||
describe('Routes', () => { | ||
it('should respond with 200 on GET /', async () => { | ||
const res = await request(app).get('/') | ||
expect(res.status).toBe(200) | ||
}) | ||
}) |
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,21 @@ | ||
import process from 'node:process'; | ||
|
||
import { config } from 'dotenv'; | ||
import express from 'express'; | ||
|
||
config(); | ||
|
||
const app = express(); | ||
|
||
const hostname = process.env.HOSTNAME; | ||
const port = process.env.SERVER_PORT; | ||
|
||
app.get('/', (_, res) => { | ||
res.send('Hello World'); | ||
}); | ||
|
||
app.listen(3000, () => { | ||
console.log(`Server is running on ${hostname}:${port}`); | ||
}); | ||
|
||
export default app; |
Oops, something went wrong.