how to run webpack dev server in windows code example

Example 1: npm webpackdev server

npm install webpack-dev-server --save-dev

Example 2: npm dev server

$ npm install dev-server -g

Example 3: webpack dev server

devServer: {
		open: true,
		compress: true,
		hot: true,
		inline: true,
		watchContentBase: true,
		contentBase: resolve(process.cwd(), 'build'),
		historyApiFallback: true,
		before: (app, server, compiler) => {
			const fileExist = existsSync('./src/setupProxy.js')
			if (fileExist) {
				const pathProxy = resolve(process.cwd(), 'src/setupProxy')
				return require(`${pathProxy}`)(app)
			}
		},
		port: process.env.PORT || 3000,
		liveReload: false
	},

Example 4: webpack dev server

devServer: {
		open: true,
		compress: true,
		hot: true,
		inline: true,
		watchContentBase: true,
		contentBase: resolve(process.cwd(), 'build'),
		historyApiFallback: true,
		before: (app, server, compiler) => {
			const fileExist = existsSync('./src/setupProxyx.js')
			if (fileExist) {
				const pathProxy = resolve(process.cwd(), 'src/setupProxy')
				return require(`${pathProxy}`)(app)
			}
		},
		port: process.env.PORT || 3000,
		liveReload: false
	},