mirror of
https://github.com/sasjs/server.git
synced 2025-12-11 03:34:35 +00:00
chore(*): initial commit
This commit is contained in:
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
coverage/
|
||||||
|
dist/
|
||||||
|
node_modules/
|
||||||
|
.DS_Store
|
||||||
|
.env*
|
||||||
8
.prettierrc.json
Normal file
8
.prettierrc.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
{
|
||||||
|
"trailingComma": "none",
|
||||||
|
"tabWidth": 2,
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"endOfLine": "auto"
|
||||||
|
}
|
||||||
1529
package-lock.json
generated
Normal file
1529
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
22
package.json
Normal file
22
package.json
Normal 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
17
src/index.ts
Normal 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
10
tsconfig.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5",
|
||||||
|
"module": "commonjs",
|
||||||
|
"rootDir": "./",
|
||||||
|
"outDir": "./dist",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"strict": true
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user