Giter VIP home page Giter VIP logo

ixartz / serverless-boilerplate-express-typescript Goto Github PK

View Code? Open in Web Editor NEW
529.0 529.0 78.0 6.11 MB

๐Ÿš€๐ŸŽ‰๐Ÿ“š Boilerplate and Starter for Serverless framework, ExpressJS, TypeScript, Prisma and MongoDB โšก๏ธ Made with developer experience first: Serverless framework + Live reload + Offline support + ExpressJS + TypeScript + ESLint + Prettier + Husky + Commitlint + Lint-Staged + Jest + Dotenv + esbuild + VSCode

Home Page: https://creativedesignsguru.com

License: MIT License

Shell 7.25% TypeScript 68.81% JavaScript 23.94%
airbnb-eslint aws backend boilerplate eslint express expressjs javascript lambda nodejs offline prettier serverless serverless-framework serverless-http starter starter-template templates typescript vscode

serverless-boilerplate-express-typescript's People

Contributors

ixartz avatar kaveet avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

serverless-boilerplate-express-typescript's Issues

`pnpm` out of the box?

pnpm gives drastically better performance than npm and would improve the developer experience, especially because of the large number of development dependencies this template uses. Thoughts?

Note that it doesn't currently work out of the box if you just try and use pnpm. Getting this error: pnpm/pnpm#3275

Workaround that I'm using:

Make a .czrc file:

{
  "path": "cz-conventional-changelog"
}

Remove relevant section from package.json:

"config": {
    "commitizen": {
      "path": "@commitlint/cz-commitlint"
    }
  },

Also set up a .npmrc like this, unsure if needed:

enable-pre-post-scripts=true
auto-install-peers=true
node-linker=hoisted

No such option: -c

npm run deploy-prod

[email protected] deploy-prod
run-s deploy:*

[email protected] deploy:db
dotenv -e .env.production -c -- ts-node --esm scripts/deployDbProd.ts

Usage: dotenv [OPTIONS] COMMAND [ARGS]...
Try 'dotenv --help' for help.

Error: No such option: -c
ERROR: "deploy:db" exited with 2.

Add Swagger Support

Issue Description:
Requesting the addition of Swagger support to the project. Swagger integration would enhance API documentation and streamline development by providing standardized endpoint information.

Expected Benefits:
Improved API understanding
Easier client integration
Reduced learning curve for newcomers

Proposed Implementation:
Integrate Swagger using libraries like swagger-jsdoc and swagger-ui-express. Include configuration options for customization.

Contributions:
I'm interested in contributing to the implementation.

Access-Control headers missing from handler responses

Relates to #1

Any opinions on providing an example of Access-Control headers on responses coming from the handlers as part of this boilerplate?

Because Serverless is configured to respond to preflight requests, it's possible that a browser on a different origin will pass preflight requests but error when requesting to one of the handlers (especially with Content-Type: application/json):

This could be a hiccup if someone deploys the service without testing CORS locally.

Some ideas:

  • Use an Express middleware like cors
  • Provide an example sending back headers manually:
   app.get('/', (req, res) => {
     console.log(req.headers)
     res
       .set({
         'Access-Control-Allow-Origin': 'https://example.com', // '*'
       })
       .json({
         msg: 'Hello World',
       })
   });

Like #1, this might be out of scope for this boilerplate. Great project nonetheless!

Repository as template?

Hey, love your work for the boilerplate. Wouldn't it be great if you enable the Template repository checkbox under repository settings. It would resolve all the hassle of cloning your repo and doing other changes. Just a suggestion.

image

Vscode Debugger is not working

Hello,

I cloned your repo and followed the installation steps. Trying to debug via vscode debugger but it's not stopping at the breakpoint. Can you please help me here?

Node version - 14.15.3

launch.json file

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Severless debug",
      "runtimeVersion": "14.15.3",
      "program": "${workspaceFolder}/node_modules/.bin/sls",
      "args": ["offline", "start", "--stage", "offline"],
      "env": { "NODE_ENV": "development" },
      "autoAttachChildProcesses": true,
      "sourceMaps": true,
      "skipFiles": ["<node_internals>/**"],
      "console": "integratedTerminal"
    }
  ]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.