This is just a technology testing project based on Create React App and TailwindCSS
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

30 lines
814B

  1. const config = require('./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);