1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00

chore(*): initial commit

This commit is contained in:
Yury Shkoda
2021-06-09 09:03:54 +03:00
commit c3b7a84322
6 changed files with 1591 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
coverage/
dist/
node_modules/
.DS_Store
.env*

8
.prettierrc.json Normal file
View File

@@ -0,0 +1,8 @@
{
"trailingComma": "none",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"endOfLine": "auto"
}

1529
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

22
package.json Normal file
View File

@@ -0,0 +1,22 @@
{
"name": "server",
"version": "0.0.1",
"description": "SASjs server",
"main": "./src/index.ts",
"scripts": {
"start": "nodemon ./src/index.ts",
"build": "tsc --project ./"
},
"author": "Analytium",
"dependencies": {
"express": "^4.17.1"
},
"devDependencies": {
"@types/express": "^4.17.12",
"@types/node": "^15.12.2",
"nodemon": "^2.0.7",
"prettier": "^2.3.1",
"ts-node": "^10.0.0",
"typescript": "^4.3.2"
}
}

17
src/index.ts Normal file
View File

@@ -0,0 +1,17 @@
// Express App Setup
import express from 'express'
import bodyParser from 'body-parser'
const app = express()
app.use(bodyParser.json())
// Express route handlers
app.get('/', (req, res) => {
res.send('Hey from @sasjs/server API!')
})
const port = 5000
app.listen(port, () => {
console.log(`⚡️[server]: Server is running at https://localhost:${port}`)
})

10
tsconfig.json Normal file
View File

@@ -0,0 +1,10 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"rootDir": "./",
"outDir": "./dist",
"esModuleInterop": true,
"strict": true
}
}