Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@shopify/shopify-app-express
Advanced tools
Shopify Express Middleware - to simplify the building of Shopify Apps with Express
@shopify/shopify-app-express
This package makes it easy for Express.js apps to integrate with Shopify.
It builds on the @shopify/shopify-api
package and creates a middleware layer that allows the app to communicate with and authenticate requests from Shopify.
Note: this package will enable your app's backend to work with Shopify APIs, and by default it will behave as an embedded app. You'll need to use Shopify App Bridge in your frontend to authenticate requests to the backend.
To install this package, you can run this on your terminal:
# You can use your preferred Node package manager
yarn add @shopify/shopify-app-express @shopify/shopify-api
Then, you can import the package in your app
import {shopifyApp} from '@shopify/shopify-app-express';
import express from 'express';
const PORT = 8080;
const shopify = shopifyApp({
api: {
apiKey: 'ApiKeyFromPartnersDashboard',
apiSecretKey: 'ApiSecretKeyFromPartnersDashboard',
scopes: ['your_scopes'],
hostScheme: 'http',
hostName: `localhost:${PORT}`,
},
});
const app = express();
// Handles authenticating your app when you visit /api/auth
app.use('/api', shopify.app());
app.get('/', (req, res) => {
res.send('Hello world!');
});
app.listen(PORT);
You can then run your Express app as usual, for instance using:
node ./index.js
And access http://localhost:8080
in your browser to view your app.
You can find all allowed configuration options for shopifyApp
in the reference docs.
FAQs
Shopify Express Middleware - to simplify the building of Shopify Apps with Express
The npm package @shopify/shopify-app-express receives a total of 8,284 weekly downloads. As such, @shopify/shopify-app-express popularity was classified as popular.
We found that @shopify/shopify-app-express demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.