Skip to content

Commit

Permalink
working version
Browse files Browse the repository at this point in the history
  • Loading branch information
lyricalsoul committed Feb 25, 2023
0 parents commit 66d1e6b
Show file tree
Hide file tree
Showing 24 changed files with 3,465 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
tsconfig.tsbuildinfo
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/coloris.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"parser": {
"syntax": "typescript",
},
"target": "es2022"
},
"module": {
"type": "es6"
},
"sourceMaps": true
}
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## @musicorum/coloris

coloris is a set of tools for back-end applications, providing things such as logging, prometheus metrics,
configuration, and more.

### how?

overly complex hello world:

```js
import {log, metrics} from '@musicorum/coloris'

metrics.setAppName('test')

const metric = metrics.register('counter', {
name: 'http_requests_total',
description: 'total number of http requests'
})

server.get('/', (req, res) => {
log.info('server.handler', 'got a request!')
metric.increase()
res.send('hello world!')
})

server.get('/metrics', (req, res) => {
res.send(metrics.toPrometheus())
})

server.listen(3000)
```
Loading

0 comments on commit 66d1e6b

Please sign in to comment.