GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — studio/index.es.js at master · devpunks/studio

Expand file tree

/

index.es.js

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
34 lines (27 loc) · 1.02 KB
/

index.es.js

Copy path

File metadata and controls

34 lines (27 loc) · 1.02 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Express documentation - https://expressjs.com/en/api.html
// Express.js Alternatives - https://betterstack.com/community/guides/scaling-nodejs/expressjs-alternatives
import http from 'http'
import { json // parser
, Router // router
, default as express // server
} from 'express'
import log from './logger.js'
const
{ METHODS } = http
, { PORT = 3000 } = process.env
console.log ( METHODS )
export default class Resource extends Router {
constructor() {
super ( { strict: true, caseSensitivity: true, mergeParams: true } )
// .route ( '/' )
.get ( '/', ( req, res ) => res.json ( { data: 'SHEESH' } ) )
.get ( '/welcome', ( req, res ) =>
res.send ( '<h1>Hello</h1> welcome to my http server made with express' ) )
} // custructor
} // Resource
const app = ( new Resource )
.use ( log ( 'foo.log' ) )
.use ( ( req, res, next ) => res.status ( 404 ).send ( "That route doesn't exist" ) )
void ( new express () )
.use( app )
.listen ( PORT, _ => console.log ( `Listening on port ${PORT}` ) )
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.