-
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.
feat: initial typescript setup completed
- Loading branch information
1 parent
ba84995
commit f73071e
Showing
32 changed files
with
3,342 additions
and
745 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,2 +1,3 @@ | ||
node_modules | ||
.env | ||
.env | ||
./dist |
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
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,29 @@ | ||
name: Bug report | ||
description: Create a bug report to help us address errors in the repository | ||
title: "[BUG] <bug description>" | ||
labels: [bug] | ||
body: | ||
- type: textarea | ||
id: bugdescription | ||
attributes: | ||
label: Description of the bug | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: workingenvironment | ||
attributes: | ||
label: Working Environment (e.g. operating system, browser, device) | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: screenshots | ||
attributes: | ||
label: Please add screenshots (if applicable) | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: context | ||
attributes: | ||
label: Add any other context about the problem here | ||
validations: | ||
required: 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,23 @@ | ||
name: Ideas | ||
description: Have a new idea or feature request | ||
title: "[FEATURE REQUEST] <description here>" | ||
labels: [ideas] | ||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description of feature request, idea | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: screenshots | ||
attributes: | ||
label: Add (multiple) screenshot links (if applicable) | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: context | ||
attributes: | ||
label: Add any other context about the feature request here | ||
validations: | ||
required: 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,35 @@ | ||
name: pull request | ||
description: Create a pull request | ||
title: "[PULL REQUEST] <pull request details>" | ||
labels: [enhancement] | ||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description of the changes, you have made.(Mention the issue number, it solves.) | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: workingenvironment | ||
attributes: | ||
label: Mention if the changes are for any specific Working Environment (e.g. operating system, browser, device, N/A) | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: screenshots | ||
attributes: | ||
label: Please add some pictorial references to these changes, if applicable (Drag & Drop your ss below) | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: solution | ||
attributes: | ||
label: Does your code changes make any other feature broke? (If Yes, State reason) | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: context | ||
attributes: | ||
label: Any other context or any note for reviewer, to add here regarding this change. | ||
validations: | ||
required: 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,17 @@ | ||
name: continuos-integration-checks | ||
on: | ||
push: | ||
branches: [ main ] | ||
jobs: | ||
continuos-integration: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Run eslint check | ||
run: npm run lint | ||
|
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,3 @@ | ||
node_modules | ||
.env | ||
.env | ||
/dist | ||
node_modules |
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 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Sarthak | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,14 @@ | ||
# base-ts-express-server-setup | ||
|
||
|
||
You can clone this repo and start building your restful API in typescript using express.js | ||
|
||
``` | ||
NOTE: Feedbacks for the scope of improvement and more code best practices are appreciated. | ||
Raise an issue if facing error or bug. | ||
``` | ||
|
||
## Connnect with me here: | ||
|
||
- [Twitter](https://twitter.com/sarthakjdev)<br> | ||
- [Linkedin](https://www.linkedin.com/in/sarthakjdev) |
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 @@ | ||
node_modules/ |
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,17 @@ | ||
version: '3.9' | ||
|
||
services: | ||
postgres: | ||
container_name: crossknot-api | ||
image: postgres | ||
environment: | ||
- POSTGRES_USER=crossknot | ||
- POSTGRES_DB=crossknot | ||
- POSTGRES_PASSWORD=crossknot | ||
volumes: | ||
- crossknot-data:/var/lib/postressql/data | ||
ports: | ||
- "5431:5432" | ||
|
||
volumes: | ||
crossknot-data: |
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,2 @@ | ||
[2022-07-07T12:40:57.055Z] [32minfo[39m: Server is listenning on 3000 | ||
[2022-07-07T12:49:35.895Z] [32minfo[39m: Server is listenning on 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,24 @@ | ||
import express from 'express' | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
import dotenv from 'dotenv/config' | ||
import config from '@configs/config' | ||
import logger from '@utils/logger' | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
import cors from 'cors' | ||
|
||
import ready from '@controllers/ready' | ||
// requiring routes files : | ||
import serverRoute from '@routes/index' | ||
|
||
const port = config.PORT || 5000 | ||
|
||
const app = express() | ||
app.use(cors()) | ||
app.use(express.urlencoded({ extended: true })) | ||
app.use(express.json()) | ||
app.use('/', serverRoute) | ||
app.get('/', ready) | ||
|
||
app.listen(port, () => { | ||
logger.info(`Server is listenning on ${port}`) | ||
}) |
Oops, something went wrong.