Một mục mã nguồn mở trong kho dữ liệu GitHub của TopGit: parse-community/parse-server-example, 1.9k sao, JavaScript. Example of Parse Server using the express framework.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This is an example project using the Parse Server module on Express.
The Parse Server guide is a good place to get started. An API reference and Cloud Code guide are also available. If you're interested in developing for Parse Server, the Development guide will help you get set up. All documentations for Parse Platform's server and its client SDKs are available at parseplatform.org.
Local Development
Docker Deployment
Helpful Scripts
Remote Deployment
Heroku
AWS Elastic Beanstalk
Microsoft Azure App Service
Google App Engine
Scalingo
OpenShift Online (Next Gen)
Using Parse Server
Health Check
APIs and SDKs
REST API
JavaScript
Android
iOS / tvOS / iPadOS / macOS (Swift)
Local Development
Make sure you have a compatible Node.js version installed. Run node --version to see your local Node.js version. Open the package.json file too see which version of Node.js this example repository requires at { engines": { "node": "<NODE_VERSION>" } }. Note that there may be other Parse Server version available that support older or newer Node.js versions, see the Parse Server compatibility table.
Clone this repository and change directory to it.
Run npm install.
Install a MongoDB database locally from https://docs.mongodb.org/master/tutorial/install-mongodb-on-os-x.
Run mongo to connect to your database, just to make sure it's working. Once you see a mongo prompt, exit with Control-D.
Launch Parse Server with npm start.
By default the API route will use /parse as a base. You can change this by setting the environment variable PARSE_MOUNT, for example in the CLI run run export PARSE_MOUNT=/app to set the path to app.
Your Parse Server is not running and is connected to your local database named dev in which the data is stored that you manage via Parse Server.
Docker Deployment
You can also run Parse Server using Docker:
Create a .env file with your configuration variables. For example:
Mount the logs directory to persist logs outside the container
Mount the cloud directory to access your Cloud Code files from the container
You can customize the mounted volumes based on your needs, such as mounting config files or other directories that require persistence or runtime modifications.
Helpful Scripts
These scripts can help you to develop your app for Parse Server:
npm run watch will start your Parse Server and restart if you make any changes.
npm run lint will check the linting of your cloud code, tests and index.ts, as defined in .eslintrc.json.
npm run lint-fix will attempt fix the linting of your cloud code, tests and index.ts.
npm run prettier will help improve the formatting and layout of your cloud code, tests and index.ts, as defined in .prettierrc.
npm test will run all tests
npm run coverage will run tests and check coverage. Output is available in the /coverage folder.
Configuration
Configuration is located in config.ts.
Remote Deployment
Heroku
Alternatively, to deploy manually:
Clone the repo and change directory to it
Log in with the Heroku Toolbelt and create an app: heroku create
Use the mLab addon: heroku addons:create mongolab:sandbox --app YourAppName
By default it will use a path of /parse for the API routes. To change this, or use older client SDKs, run heroku config:set PARSE_MOUNT=/1
Deploy it with: git push heroku master
AWS Elastic Beanstalk
Alternatively, deploy your local changes manually:
Clone the repo and change directory to it
Log in with the AWS Elastic Beanstalk CLI, select a region, and create an app: eb init
Create an environment and pass in MongoDB URI, App ID, and Master Key: eb create --envvars DATABASE_URI=<replace with URI>,APP_ID=<replace with Parse app ID>,MASTER_KEY=<replace with Parse master key>
Microsoft Azure App Service
Detailed information is available here:
Parse Server with Azure Managed Services
Parse Server Azure Blog Post
Google App Engine
Clone the repo and change directory to it
Create a project in the Google Cloud Platform Console.
Enable billing for your project.
Install the Google Cloud SDK.
Setup a MongoDB server. You have a few options:
Create a Google Compute Engine virtual machine with MongoDB pre-installed.
Use mLab to create a free MongoDB deployment on Google Cloud Platform (only US-central).
Modify app.yaml to update your environment variables.
Delete Dockerfile
Deploy it with gcloud preview app deploy
A detailed tutorial is available here:
Running Parse server on Google App Engine
Scalingo
Alternatively, to deploy manually:
Clone the repo and change directory to it
Log in with the Scalingo CLI and create an app: scalingo create my-parse
Use the Scalingo MongoDB addon: scalingo addons-add scalingo-mongodb free
By default it will use a path of /parse for the API routes. To change this, or use older client SDKs, run scalingo env-set PARSE_MOUNT=/1
Deploy it with: git push scalingo master
OpenShift Online (Next Gen)
Register for a free OpenShift Online (Next Gen) account
Create a project in the OpenShift Online Console.
Install the OpenShift CLI.
Add the Parse Server template to your project: oc create -f https://raw.githubusercontent.com/ParsePlatform/parse-server-example/master/openshift.json
Deploy Parse Server from the web console
Open your project in the OpenShift Online Console:
Click Add to Project from the top navigation
Scroll down and select NodeJS > Parse Server
(Optionally) Update the Parse Server settings (parameters)
Click Create
A detailed tutorial is available here:
Running Parse Server on OpenShift Online (Next Gen)
Using Parse Server
Health Check
You can use the /health endpoint to verify that Parse Server is up and running. For example, for local deployment, enter this URL in your browser:
http://localhost:1337/parse/health
If you deployed Parse Server remotely, change the URL accordingly.
APIs and SDKs
Use the REST API, GraphQL API or any of the Parse SDKs to see Parse Server in action. Parse Server comes with a variety of SDKs to cover most common ecosystems and languages, such as JavaScript, Swift, ObjectiveC and Android just to name a few.
The following shows example requests when interacting with a local deployment of Parse Server. If you deployed Parse Server remotely, change the URL accordingly.
// Initialize SDK in the application class
Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
.applicationId("YOUR_APP_ID")
.server("http://localhost:1337/parse/") // '/' important after 'parse'
.build());
// Save object
ParseObject obj = new ParseObject("TestObject");
obj.put("foo", "bar");
obj.saveInBackground();
iOS / tvOS / iPadOS / macOS (Swift)
// Initialize SDK in AppDelegate
Parse.initializeWithConfiguration(ParseClientConfiguration(block: {
(configuration: ParseMutableClientConfiguration) -> Void in
configuration.server = "http://localhost:1337/parse/" // '/' important after 'parse'
configuration.applicationId = "YOUR_APP_ID"
}))
You can change the server URL in all of the open-source SDKs, but we're releasing new builds which provide initialization time configuration of this property.
Đọc thêm về parse-community/parse-server-example ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/parse-community/parse-server-example là nguồn chính thức.
parse-community/parse-server-example có bao nhiêu sao?
parse-community/parse-server-example có 1.9k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/parse-community/parse-server-example. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
parse-community/parse-server-example có phải mã nguồn mở không?
Có — parse-community/parse-server-example phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/parse-community/parse-server-example.
parse-community/parse-server-example có trang demo không?
Dự án có trang chủ ở http://parseplatform.org. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
parse-community/parse-server-example là gì?
parse-community/parse-server-example (parse-community/parse-server-example) là dự án JavaScript trên GitHub. Theo mô tả gốc: Example of Parse Server using the express framework.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về parse-server-example?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về parse-server-example.