Skip to content

syntax error at src/index.ts #2

@oynozan

Description

@oynozan

There is a syntax error at src/index.ts that prevents running dev command on fresh clones.

✘ [ERROR] Expected "}" but found "maxAge"
       src/index.ts:19:2:
         19 │     maxAge: 86400, // 24 hours
            │     ~~~~~~
            ╵     }

Simply remove the misplaced "x" in cors settings.

cors({
		origin: '*', // Allow any origin for development; restrict this in production
		allowMethods: ['POST', 'GET', 'OPTIONS'],
		allowHeaders: ['Content-Type'],
		exposeHeaders: ['X-Session-Id'],x
		maxAge: 86400, // 24 hours
	}),

to

cors({
		origin: '*', // Allow any origin for development; restrict this in production
		allowMethods: ['POST', 'GET', 'OPTIONS'],
		allowHeaders: ['Content-Type'],
		exposeHeaders: ['X-Session-Id'],
		maxAge: 86400, // 24 hours
	}),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions