How to use dev-ip - 4 common examples

To help you get started, we’ve selected a few dev-ip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github swashata / wp-webpack-script / packages / scripts / src / scripts / Server.ts View on Github external
constructor(
		projectConfig: ProjectConfig,
		serverConfig: ServerConfig,
		cwd: string,
		callbacks: Callbacks
	) {
		this.projectConfig = projectConfig;
		this.serverConfig = serverConfig;
		this.cwd = cwd;
		this.callbacks = callbacks;
		// Override serverConfig host if it is undefined
		if (!this.serverConfig.host) {
			const possibleHost = devIp();
			if (possibleHost) {
				// eslint-disable-next-line prefer-destructuring
				this.serverConfig.host = possibleHost[0];
			}
		}
		// Create the webpackConfig
		this.webpackConfig = new CreateWebpackConfig(
			this.projectConfig,
			this.serverConfig,
			this.cwd,
			true
		);
		// Check if project has typescript
		const [hasTs, tsConfigPath] = hasTypeScript(this.cwd);
		this.hasTs = hasTs;
		this.tsConfigPath = tsConfigPath;
github qlik-oss / halyard.js / test / integration / mixin-error-handling.spec.js View on Github external
describe('Enigma Mixin error handling', () => {
  let docName = '';
  const ip = getIp()[0];
  const url = `http://${ip}:9000/attendance.html`;

  beforeEach(() => {
    docName = Utils.getUniqueDocName();
  });

  it('should throw connection error if resource is misspelled', () => {
    const halyard = new Halyard();

    const url = 'http://www.misspelleddatasource.se/thatdoesntexists/';

    halyard.addTable(url, { name: 'Table' });

    return Utils.openSession(docName).then(session => session.createAppUsingHalyard(docName, halyard).then((result) => {})
      .catch((err) => {
        expect(err.type).to.eql('Connection Error');
github qlik-oss / halyard.js / test / integration / connection.spec.js View on Github external
describe('Connections', () => {
  const ip = getIp()[0];

  it('should work to load data from http', () => {
    const url = `http://${ip}:9000/attendance.html`;
    const halyard = new Halyard();

    const table = new Halyard.Table(url, { name: 'Allsvenskan', headerRowNr: 1, characterSet: 'utf8' });

    halyard.addTable(table);
    const docName = Utils.getUniqueDocName();

    return Utils.openSession(docName).then((session) => {

      return session.createAppUsingHalyard(docName, halyard).then(result => session.openDoc(docName).then(app => app.getTableData(-1, 30, true, 'Allsvenskan').then((result) => {
        expect(result[0].qValue[0].qText).to.eql('Lag');
        expect(result[1].qValue[0].qText).to.eql('Hammarby');
github leon-ai / leon / scripts / app / serve-app.js View on Github external
if (globs[i].indexOf('.es6.js') !== -1) {
      bs.watch(globs[i], async (e) => {
        if (e === 'change') {
          await buildApp()

          bs.reload(globs[i])
        }
      })
    } else {
      bs.watch(globs[i])
        .on('change', bs.reload)
    }
  }

  bs.init({
    host: devip(),
    port: process.env.LEON_WEBAPP_PORT,
    open: true,
    server: {
      baseDir: 'app/',
      index: 'index.html'
    }
  })

  resolve()
})

dev-ip

Find a suitable IP host to view local websites on.

MIT
Latest version published 10 years ago

Package Health Score

65 / 100
Full package analysis

Popular dev-ip functions

Similar packages