mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
22 lines
608 B
JavaScript
22 lines
608 B
JavaScript
|
const express = require( "express" );
|
||
|
const mockServer = require( "./middleware-mockserver" );
|
||
|
const fs = require( "fs" );
|
||
|
|
||
|
const nameHTML = fs.readFileSync( "./test/data/name.html", "utf8" );
|
||
|
const app = express();
|
||
|
|
||
|
app.use( mockServer() );
|
||
|
|
||
|
app.post( "/test/data/name.html", function( _req, res ) {
|
||
|
res.send( nameHTML );
|
||
|
} );
|
||
|
|
||
|
app.use( "/dist", express.static( "dist" ) );
|
||
|
app.use( "/src", express.static( "src" ) );
|
||
|
app.use( "/test", express.static( "test" ) );
|
||
|
app.use( "/external", express.static( "external" ) );
|
||
|
|
||
|
app.listen( 3000, function() {
|
||
|
console.log( "Server is running on port 3000" );
|
||
|
} );
|