Create a Reverse proxy server in NodeJS which should serve static site
Attendee should be able to implement reverse proxy in Nodejs. Reverse proxy shold able to serve static site. Proxy should handle the HTML Push state too.
package main | |
const ( | |
ER_HASHCHK = 1000 | |
ER_NISAMCHK = 1001 | |
ER_NO = 1002 | |
ER_YES = 1003 | |
ER_CANT_CREATE_FILE = 1004 | |
ER_CANT_CREATE_TABLE = 1005 | |
ER_CANT_CREATE_DB = 1006 |
package main | |
import ("regexp" | |
"errors" | |
"fmt" | |
) | |
var errExtract = regexp.MustCompile(`Err (\d+)`) | |
func main(){ | |
customErr := errors.New("Err 1024 ; sql must use 3 rows but define 4 in scan") | |
match := errExtract.FindStringSubmatch(customErr.Error()) |