File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
appengine/metadata/standard Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 99 "type" : " git" ,
1010 "url" : " https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git"
1111 },
12+ "type" : " module" ,
1213 "engines" : {
1314 "node" : " 20.x"
1415 },
Original file line number Diff line number Diff line change 1414
1515'use strict' ;
1616
17- const express = require ( 'express' ) ;
18- const fetch = require ( 'node-fetch' ) ;
17+ import express from 'express' ;
18+ import fetch from 'node-fetch' ;
1919
2020const app = express ( ) ;
2121app . enable ( 'trust proxy' ) ;
@@ -57,4 +57,5 @@ app.listen(PORT, () => {
5757 console . log ( `App listening on port ${ PORT } ` ) ;
5858 console . log ( 'Press Ctrl+C to quit.' ) ;
5959} ) ;
60- module . exports = app ;
60+
61+ export default app ;
Original file line number Diff line number Diff line change 1- const path = require ( 'path' ) ;
2- const supertest = require ( 'supertest' ) ;
3- const app = require ( path . join ( __dirname , '../' , 'server.js' ) ) ;
1+ import supertest from 'supertest' ;
2+ import app from '../server.js' ;
43
54it ( 'should be listening' , async ( ) => {
65 await supertest ( app ) . get ( '/' ) . expect ( 200 ) ;
You can’t perform that action at this time.
0 commit comments