This is just a technology testing project based on Create React App and TailwindCSS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930
  1. const config = require('./support/config');
  2. const { setWorldConstructor } = require('@cucumber/cucumber');
  3. const puppeteer = require('puppeteer');
  4. const scope = require('./support/scope');
  5. const express = require('express');
  6. const httpShutdown = require('http-shutdown');
  7. const path = require('path');
  8. const app = express();
  9. app.use(express.static(path.join(__dirname, '..', 'build')));
  10. app.get('/', (req, res)=> {
  11. res.sendFile(path.join(__dirname, '..', 'build', 'index.html'));
  12. })
  13. const web = httpShutdown(app.listen(config.port, () => {
  14. console.log(`Web is listening on port ${config.port}`);
  15. }));
  16. web.host = `http://localhost:${config.port}`;
  17. const World = function () {
  18. scope.host = web.host;
  19. scope.driver = puppeteer;
  20. scope.context = {};
  21. scope.web = web;
  22. };
  23. setWorldConstructor(World);